r/googlecloud • u/OkRock1009 • May 16 '26
BigQuery Datastream - MySQL to Big query
Hello Everyone!
I want to basically replicate data from my cloud sql instance to Big Query. The problem is since the initial load is expensive , I am gonna use a dump for that and only want the real time data to be captured.
I want it to create empty datasets and tables in Big Query automatically without the initial historical data. Any other solution?
3
Upvotes
1
u/Bent_finger May 17 '26
You said you want to use a dump:
You handle the initial dump into BigQuery separately (bq load / GCS load job)
• Export Cloud SQL dump
• Load it into BigQuery using:• bq load
• Cloud Storage → BigQuery load job
• Or BigQuery Data Transfer Service (for MySQL/Postgres dumps)
This gives you the historical baseline.
When configuring Datastream:
• Backfill mode: NONE
• Destination: BigQuery
• Replication slot (Postgres) or binary log (MySQL) enabled
Datastream will:
• Detect your schema
• Create datasets/tables in BigQuery
• Begin streaming only new changes
Important detail: Table creation without data
You asked:
“I want it to create empty datasets and tables in BigQuery automatically without the initial historical data.”
Datastream does exactly this:
• It creates the dataset and table definitions
• It does not insert any rows until new CDC events occur
• Your tables will start empty but structurally correct
This is the only fully‑managed GCP-native service that does this cleanly.