Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 5890b57

Browse files
committed
add a message for unsupported bigquery dbt auth methods
1 parent 8e073e8 commit 5890b57

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

data_diff/cloud/data_source.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,14 @@ def _align_dbt_cred_params_with_datafold_params(dbt_creds: dict) -> dict:
126126
dbt_creds["jsonKeyFile"] = json.dumps(data)
127127
elif method == "service-account-json":
128128
dbt_creds["jsonKeyFile"] = json.dumps(dbt_creds["keyfile_json"])
129+
else:
130+
rich.print(
131+
f'[red]Cannot extract bigquery credentials from dbt_project.yml for "{method}" type. '
132+
f"If you want to provide credentials via dbt_project.yml, "
133+
f'please, use "service-account" or "service-account-json" '
134+
f"(more in docs: https://docs.getdbt.com/reference/warehouse-setups/bigquery-setup). "
135+
f"Otherwise, you can provide a path to a json key file or a json key file data as an input."
136+
)
129137
dbt_creds["projectId"] = dbt_creds["project"]
130138
elif db_type == "snowflake":
131139
dbt_creds["default_db"] = dbt_creds["database"]

0 commit comments

Comments
 (0)