You need to verify two BigQuery table outputs are identical but there is no primary key. Which approach will produce a reliable full-table comparison?
Choose an answer
Tap an option to check your answer.
Correct answer: Use a Dataproc cluster and the BigQuery Hadoop connector to read the data from each table and calculate a hash from non-timestamp columns of the table after sorting. Compare the hashes of each table..
Why this is the answer
The correct approach ensures a reliable full-table comparison, even without a primary key. By reading all data from both tables into a Dataproc cluster, sorting the data consistently (excluding non-deterministic timestamp columns), and then calculating a hash, you create a unique fingerprint for each table's content. Comparing these hashes definitively determines if the tables are identical. Random sampling (using RAND() or stratified sampling with OVER()) is unreliable for verifying identical tables because samples may match even if the full tables differ. Using HASH() on random samples is also insufficient as it doesn't guarantee full table coverage.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed