Professional Data Engineer free question 7 / 10 · Domain 3: Storing the data
The BigQuery table sales is partitioned daily by the date column sale_date and clustered by customer_id. It has four blocks: B1 (2026-03-10, customer_id 300 to 499), B2 (2026-03-10, 500 to 799), B3 (2026-03-11, 400 to 599), and B4 (2026-03-10, 700 to 999). Which statement about the query WHERE customer_id BETWEEN 450 AND 650 AND sale_date = '2026-03-10' matches the "Introduction to clustered tables" page?
- It scans B1, B2, and B4, and it is the date condition on the partitioning column that is used for block pruning
- It scans B1 and B2, and the bytes processed are the sum of the bytes of the referenced columns in all blocks of the March 10 partition (B1, B2, and B4)
- It scans B1 and B2, and the bytes processed are the sum of the bytes of the referenced columns in the scanned blocks B1 and B2 of the March 10 partition
- It scans B1, B2, and B3, and B3 is read even though it is in a partition for another day, because its customer_id range overlaps the condition
Show the answer and explanation
Answer: C
Why this is correct
The "Block pruning" section says that when a query on a clustered table has a condition on the clustered column, BigQuery uses the condition expression and the block metadata to prune the blocks it scans. Pruned blocks are not scanned, and the bytes processed are the sum of the bytes of the referenced columns in the blocks that were scanned. B3 is in the March 11 partition, so the date condition eliminates it. In March 10, B1 (300 to 499) and B2 (500 to 799) overlap 450 to 650 and are scanned, and B4 (700 to 999) does not overlap, so it is pruned.
Why the other options are wrong
"It scans B1 and B2, and the bytes processed are the sum of the bytes of the referenced columns in all blocks of the March 10 partition (B1, B2, and B4)" … The page says pruned blocks are not scanned, and only the scanned blocks are used when calculating bytes processed. The bytes of the pruned B4 are not counted, even though it is in the same day's partition.
"It scans B1, B2, and B4, and it is the date condition on the partitioning column that is used for block pruning" … The page says that when a query has a condition on the clustered column, BigQuery uses the condition expression and block metadata to prune the blocks it scans. Because of the customer_id condition, B4, whose value range does not overlap, is not scanned.
"It scans B1, B2, and B3, and B3 is read even though it is in a partition for another day, because its customer_id range overlaps the condition" … The page's example shows the date condition on the partitioning column pruning the blocks of other days (B3). Even if the clustered column's range overlaps the condition, a block in a partition for another day is not read.
How cost appears
The page says that when a query references a clustered table several times with different conditions, you are billed for scanning the columns of the blocks that match each condition. Reducing the parts that are not read through block pruning is how clustering lowers cost.