nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #374

You have terabytes of customer behavioral data streaming from Google Analytics into BigQuery daily. Your customers' information, such as their preferences, is hosted on a Cloud SQL for MySQL database.

The correct answer is C. Create streams in Datastream to replicate the required tables from both Cloud SQL databases to BigQuery for these queries.. C is correct because Datastream continuously replicates the Cloud SQL tables into BigQuery using Change Data Capture (CDC), so all 100–300 daily campaign queries run entirely within BigQuery - the Cloud SQL databases are only touched during replication, not during each query exec

Submitted by olafpl· Mar 30, 2026Designing data processing systems

Question

You have terabytes of customer behavioral data streaming from Google Analytics into BigQuery daily. Your customers' information, such as their preferences, is hosted on a Cloud SQL for MySQL database. Your CRM database is hosted on a Cloud SQL for PostgreSQL instance. The marketing team wants to use your customers' information from the two databases and the customer behavioral data to create marketing campaigns for yearly active customers. You need to ensure that the marketing team can run the campaigns over 100 times a day on typical days and up to 300 during sales. At the same time, you want to keep the load on the Cloud SQL databases to a minimum. What should you do?

Options

  • ACreate BigQuery connections to both Cloud SQL databases. Use BigQuery federated queries on the two databases and the Google Analytics data on BigQuery
  • BCreate a job on Apache Spark with Dataproc Serverless to query both Cloud SQL databases and the Google Analytics data on BigQuery for these queries.
  • CCreate streams in Datastream to replicate the required tables from both Cloud SQL databases to BigQuery for these queries.
  • DCreate a Dataproc cluster with Trino to establish connections to both Cloud SQL databases and BigQuery, to execute the queries.

How the community answered

(43 responses)
  • A
    7% (3)
  • B
    19% (8)
  • C
    63% (27)
  • D
    12% (5)

Explanation

C is correct because Datastream continuously replicates the Cloud SQL tables into BigQuery using Change Data Capture (CDC), so all 100–300 daily campaign queries run entirely within BigQuery - the Cloud SQL databases are only touched during replication, not during each query execution, directly satisfying the "minimize Cloud SQL load" requirement.

A is wrong because BigQuery federated queries reach out and hit Cloud SQL at query time - every one of those 300 peak queries would create a live connection to Cloud SQL, which is the opposite of minimizing its load.

B is wrong because a Dataproc Serverless Spark job would also connect directly to Cloud SQL each time it runs, adding load proportional to query frequency, and introduces unnecessary complexity for what is essentially a data movement and querying problem.

D is wrong for the same core reason as B and A - Trino on Dataproc queries Cloud SQL live at execution time, so each of the 300 peak runs hits the databases directly, and it also adds cluster management overhead.

Memory tip: Think "replicate once, query forever." Whenever a question says "minimize load on the source database" while enabling high-frequency queries, the answer involves moving the data into BigQuery first (Datastream = streaming replication), not querying the source on every run.

Topics

#Data Integration#Change Data Capture#BigQuery#Cloud SQL

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice