Associate Data Practitioner · Free Practice Question Medium
Question 30
A data engineer needs to load a dataset with nested and repeated fields into BigQuery. Which file format would best preserve the nested structure without flattening?
-
A
CSV
-
B
JSON
-
C
Parquet
-
D
Fixed-width text files
Reveal correct answer
Correct answer: B
Explanation
Option B is CORRECT. JSON natively supports nested and repeated structures, making it ideal for preserving hierarchical data when loading into BigQuery. BigQuery can directly interpret the nested and repeated fields in JSON, maintaining the same structure in the resulting table. This preserves the relationships in the data without requiring flattening or complex transformations.
Option A is INCORRECT. CSV is a flat file format that doesn't support nested structures. Using CSV would require flattening the data, which loses the hierarchical relationships or requires complex workarounds that are difficult to maintain.
Option C is INCORRECT. While Parquet can technically store nested data, it's primarily optimized for columnar storage and doesn't represent nested structures as naturally as JSON for loading into BigQuery. JSON is more straightforward for nested data.
Option D is INCORRECT. Fixed-width text files are flat formats with no support for nested structures. They're even more limited than CSV for representing hierarchical data and would require complete flattening of the nested fields.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
