Skip to content

Data sync via CDC from GCP Cloud SQL to Big Query using Datastream

License

Notifications You must be signed in to change notification settings

epomatti/gcp-bigquery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gcp-bigquery

Data sync via CDC from GCP Cloud SQL to Big Query using Datastream.

Make sure to login with gcloud:

gcloud auth application-default login

First cd into the infra directory.

Create the .auto.tfvars parameter:

project_id        = "<project_id>"
region            = "us-central1"
database_tier     = "db-g1-small"
database_username = "dbadmin"
database_password = "p4ssw0rd"

Create the database:

terraform init
terraform apply -auto-approve

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 that sends the changes in the database to BigQuery.

Data should be available in the BigQuery dashboard for queries.

About

Data sync via CDC from GCP Cloud SQL to Big Query using Datastream

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages