Professional Data Engineer Practice Questions

Google Cloud Professional Data Engineer exam preparation

Professional Data Engineer practice questions in English: 180 questions with explanations. The mock exam has 50 questions and 120 minutes.

Professional Data Engineer free question 3 / 10 · Domain 2: Ingesting and processing the data

Which statement about compression when you batch load files into BigQuery matches the "Batch load data" page?

  1. CSV and JSON files can be loaded with the same compression codecs as Parquet, not only gzip
  2. Parquet and ORC files can be loaded even when the whole file has been compressed with gzip
  3. Avro cannot be read in parallel once its data blocks are compressed, so you load it uncompressed
  4. CSV and JSON files load faster when they are uncompressed than when compressed, because they can be read in parallel
Show the answer and explanation

Answer: D

Why this is correct
The "Loading compressed and uncompressed data" section says that for formats such as CSV and JSON, uncompressed files can be read in parallel, so BigQuery can load them much faster than compressed files. The trade-off is that uncompressed files are larger, which can hit bandwidth limits and raise the cost of the data you stage in Cloud Storage before loading. If bandwidth is limited, compress the files with gzip before uploading them to Cloud Storage; if load speed matters and bandwidth is sufficient, leave them uncompressed.

Why the other options are wrong
"Parquet and ORC files can be loaded even when the whole file has been compressed with gzip" … The section says Avro, Parquet, and ORC files whose data inside the file is compressed with a supported codec can be loaded, but files compressed as a whole with a tool such as gzip cannot.
"Avro cannot be read in parallel once its data blocks are compressed, so you load it uncompressed" … The section says the Avro binary format is the preferred format for both compressed and uncompressed data, and that it loads quickly because data blocks can be read in parallel even when they are compressed.
"CSV and JSON files can be loaded with the same compression codecs as Parquet, not only gzip" … The section says gzip is the only file compression format supported when you load CSV and JSON files into BigQuery.

Key point
Parquet compresses well through efficient column-wise encoding, and it is compressed in a way that allows parallel reads. ORC data stripes can be read in parallel, and a stripe size of about 256 MB or less is recommended. In every format, the order of rows within a file is not guaranteed. Loading from a bucket in a different location than the destination dataset incurs data transfer charges.

Go to the Professional Data Engineer practice app (10 free questions; purchase unlocks all questions)

See the full practice set