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

allow pass: key for redshift #482

Merged
merged 2 commits into from
Apr 11, 2023
Merged
Changes from 1 commit
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
13 changes: 5 additions & 8 deletions data_diff/dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,7 @@ def _cloud_diff(diff_vars: DiffVars, datasource_id: int, datafold_host: str, url
send_event_json(event_json)

if error:
rich.print(
"[red]"
+ ".".join(diff_vars.prod_path)
+ " <> "
+ ".".join(diff_vars.dev_path) + "[/]\n"
)
rich.print("[red]" + ".".join(diff_vars.prod_path) + " <> " + ".".join(diff_vars.dev_path) + "[/]\n")
if diff_id:
diff_url = f"{datafold_host}/datadiffs/{diff_id}/overview"
rich.print(f"{diff_url} \n")
Expand Down Expand Up @@ -521,13 +516,15 @@ def set_connection(self):
"filepath": credentials.get("path"),
}
elif conn_type == "redshift":
if credentials.get("password") is None or credentials.get("method") == "iam":
if (credentials.get("pass") is None and credentials.get("password") is None) or credentials.get(
"method"
) == "iam":
raise Exception("Only password authentication is currently supported for Redshift.")
conn_info = {
"driver": conn_type,
"host": credentials.get("host"),
"user": credentials.get("user"),
"password": credentials.get("password"),
"password": credentials.get("password") or credentials.get("pass"),
"port": credentials.get("port"),
"dbname": credentials.get("dbname"),
}
Expand Down