Skip to content

Instantly share code, notes, and snippets.

@Geremie
Created October 31, 2020 17:23
Show Gist options
  • Save Geremie/52f248eb8cf03728ae7b8b713e9b4e0c to your computer and use it in GitHub Desktop.
Save Geremie/52f248eb8cf03728ae7b8b713e9b4e0c to your computer and use it in GitHub Desktop.
Automate your Cloud SQL data synchronization to BigQuery with Airflow
gcloud iam service-accounts create cloud-composer --display-name='Cloud Composer service account'
gcloud projects add-iam-policy-binding <project_id> --member=serviceAccount:cloud-composer@<project_id>.iam.gserviceaccount.com --role=roles/composer.worker
gcloud projects add-iam-policy-binding <project_id> --member=serviceAccount:cloud-composer@<project_id>.iam.gserviceaccount.com --role=roles/cloudsql.client
gcloud projects add-iam-policy-binding <project_id> --member=serviceAccount:cloud-composer@<project_id>.iam.gserviceaccount.com --role=roles/bigquery.user
gcloud projects add-iam-policy-binding <project_id> --member=serviceAccount:cloud-composer@<project_id>.iam.gserviceaccount.com --role=roles/bigquery.dataEditor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment