https://github.com/epomatti/gcp-bigquery
Data sync via CDC from GCP Cloud SQL to Big Query using Datastream
https://github.com/epomatti/gcp-bigquery
bigquery cloud-sql datastream gcp
Last synced: 13 days ago
JSON representation
Data sync via CDC from GCP Cloud SQL to Big Query using Datastream
- Host: GitHub
- URL: https://github.com/epomatti/gcp-bigquery
- Owner: epomatti
- License: mit
- Created: 2023-02-08T02:59:10.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-11-11T20:50:23.000Z (7 months ago)
- Last Synced: 2025-12-25T17:10:09.037Z (6 months ago)
- Topics: bigquery, cloud-sql, datastream, gcp
- Language: HCL
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gcp-bigquery
Data sync via CDC from GCP Cloud SQL to Big Query using Datastream.

Make sure to login with gcloud:
```sh
gcloud auth application-default login
```
First `cd` into the infra directory.
Create the `.auto.tfvars` parameters file and set the required values:
```sh
cp config/local.auto.tfvars .auto.tfvars
```
Create the database:
```sh
terraform init
terraform apply
```
Connect to the database and execute execute the SQL commands in the `database.sql` file.
This database already has automated backups and point-in-time recovery enabled.
Now in the GCP console [create a stream in Datastream](https://console.cloud.google.com/datastream/streams) that sends the changes in the database to BigQuery.
Data should be available in the BigQuery dashboard for queries.