Courseiva
hardMultiple ChoiceObjective-mapped

PDE Practice Question: Replicate a Cloud SQL (PostgreSQL) database to…

A company wants to replicate a Cloud SQL (PostgreSQL) database to BigQuery in near real-time for analytics. The volume is about 10GB per day with frequent updates and deletes. They need to capture changes with low latency and ensure exactly-once delivery to BigQuery. Which approach should they use?

⚠ Common exam trap

Google Cloud often tests the misconception that Cloud SQL has a native CDC feature to write to Pub/Sub, but in reality, it requires an external CDC tool like Debezium or Datastream to capture changes.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use Cloud Data Fusion with a Debezium streaming source to capture CDC from Cloud SQL and a BigQuery sink with exactly-once mode.

Cloud Data Fusion with a Debezium streaming source provides native change data capture (CDC) from PostgreSQL, capturing inserts, updates, and deletes with low latency. The BigQuery sink in exactly-once mode ensures no duplicate records, meeting the requirement for near real-time analytics with frequent updates and deletes.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Export the entire database to Cloud Storage as CSV files every hour and load them into BigQuery using a load job with WRITE_TRUNCATE.

    Why it's wrong here

    Incorrect. Exporting the entire database hourly is not near real-time and does not capture frequent updates and deletes efficiently. WRITE_TRUNCATE replaces the entire table, losing historical data and missing changes between exports.

  • Use a Dataflow pipeline with JDBCIO to read from Cloud SQL every minute and write changes to BigQuery using upserts.

    Why it's wrong here

    Incorrect. Dataflow with JDBCIO reads from Cloud SQL periodically, but it does not capture deletes and updates efficiently. JDBCIO is not designed for change data capture and cannot guarantee exactly-once delivery for upserts in near real-time.

  • Use Cloud Data Fusion with a Debezium streaming source to capture CDC from Cloud SQL and a BigQuery sink with exactly-once mode.

    Why this is correct

    Correct. Cloud Data Fusion with Debezium streaming source captures change data capture (CDC) from Cloud SQL PostgreSQL, handling inserts, updates, and deletes in near real-time. The BigQuery sink with exactly-once mode ensures no duplicate records, meeting all requirements.

  • Use Cloud SQL's change data capture feature to write changes to a Pub/Sub topic and use a Dataflow pipeline to stream into BigQuery.

    Why it's wrong here

    Incorrect. Cloud SQL does not have a native CDC feature to write changes directly to Pub/Sub. This approach would require an external CDC tool like Debezium or Datastream, making the option as stated infeasible.

About these practice questions

One of 890 original PDE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PDE exam.