Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the key of the GCP service account keyfile #197

Merged
merged 5 commits into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cosmos/providers/dbt/core/profiles/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ def create_profile_vars_google_cloud_platform(
https://docs.getdbt.com/reference/warehouse-setups/bigquery-setup
https://airflow.apache.org/docs/apache-airflow-providers-google/stable/connections/gcp.html
"""
bigquery_key_file = json.loads(conn.extra_dejson.get("keyfile_dict"))
chrishronek marked this conversation as resolved.
Show resolved Hide resolved
bigquery_key_file = conn.extra_dejson.get(
"extra__google_cloud_platform__keyfile_dict"
) or conn.extra_dejson.get("keyfile_dict")
bigquery_key_file = json.loads(bigquery_key_file or "{}")

if not bigquery_key_file:
raise ValueError("BigQuery key file not found in connection parameters")

if not schema_override:
raise ValueError(
Expand Down