Skip to content

Instantly share code, notes, and snippets.

@PedramNavid
Created February 6, 2019 19:52
Show Gist options
  • Save PedramNavid/7ea66afe2ee44826888729370271ba45 to your computer and use it in GitHub Desktop.
Save PedramNavid/7ea66afe2ee44826888729370271ba45 to your computer and use it in GitHub Desktop.
Add airflow connections to GCP via Commandline
for conn in bigquery_default google_cloud_default; do
airflow connections -d --conn_id $conn;
airflow connections -a \
--conn_id $conn \
--conn_type google_cloud_platform \
--conn_extra '{ "extra__google_cloud_platform__key_path":"'`
`'token.json", '`
`'"extra__google_cloud_platform__project":'`
`'"my-project-id", '`
`'"extra__google_cloud_platform__scope":'`
`'"https://www.googleapis.com/auth/cloud-platform"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment