Migrating trigger-based CDC to BigQuery using log-based CDC streams: to make changes available in the reporting table with minimal latency while reducing compute overhead, which two steps should you take? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Insert each new CDC record and corresponding operation type to a staging table in real time., Periodically use a DML MERGE to perform several DML INSERT, UPDATE, and DELETE operations at the same time on the reporting table..
Why this is the answer
To minimize latency and reduce compute overhead, a two-stage approach is optimal. First, inserting each new CDC record and its operation type into a staging table in real time (Option 2) is efficient because it avoids immediate, costly DML operations on the large reporting table for every single change. This offloads the immediate processing. Second, periodically using a DML MERGE statement (Option 4) on the reporting table to apply accumulated changes from the staging table is efficient. MERGE is optimized for applying multiple inserts, updates, and deletes in a single atomic operation, significantly reducing the overhead compared to individual DML statements. Option 1, performing DML for each individual CDC record directly on the reporting table, would lead to high compute overhead due to frequent, small DML operations. Option 3, periodically deleting outdated records, is a maintenance task but doesn't directly address the efficient application of CDC changes. Option 5, inserting all CDC records into the reporting table and using a materialized view, would lead to a very large reporting table with many duplicate historical records, increasing storage and query costs, and the materialized view itself would incur compute overhead to maintain.
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