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

Commit 435e7c0

Browse files
sar009dlawin
andauthored
Support all dbt connection attributes aliases (#690)
Signed-off-by: Sarad Mohanan <[email protected]> Co-authored-by: Dan Lawin <[email protected]>
1 parent d59d380 commit 435e7c0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

data_diff/dbt_parser.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@ def set_connection(self):
376376

377377
conn_info = {
378378
"driver": conn_type,
379-
"project": credentials.get("project"),
380-
"dataset": credentials.get("dataset"),
379+
"project": credentials.get("project") or credentials.get("database"),
380+
"dataset": credentials.get("dataset") or credentials.get("schema"),
381381
}
382382

383383
self.threads = credentials.get("threads")
@@ -402,13 +402,13 @@ def set_connection(self):
402402
"user": credentials.get("user"),
403403
"password": credentials.get("password") or credentials.get("pass"),
404404
"port": credentials.get("port"),
405-
"dbname": credentials.get("dbname"),
405+
"dbname": credentials.get("dbname") or credentials.get("database"),
406406
}
407407
self.threads = credentials.get("threads")
408408
elif conn_type == "databricks":
409409
conn_info = {
410410
"driver": conn_type,
411-
"catalog": credentials.get("catalog"),
411+
"catalog": credentials.get("catalog") or credentials.get("database"),
412412
"server_hostname": credentials.get("host"),
413413
"http_path": credentials.get("http_path"),
414414
"schema": credentials.get("schema"),
@@ -420,7 +420,7 @@ def set_connection(self):
420420
"driver": "postgresql",
421421
"host": credentials.get("host"),
422422
"user": credentials.get("user"),
423-
"password": credentials.get("password"),
423+
"password": credentials.get("password") or credentials.get("pass"),
424424
"port": credentials.get("port"),
425425
"dbname": credentials.get("dbname") or credentials.get("database"),
426426
}

0 commit comments

Comments
 (0)