An open API service indexing awesome lists of open source software.

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

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.