-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Normalization for Snowflake destination: added support for key pair authentication #14792
Changes from 2 commits
7dce48c
f02c29e
5893178
aa85fa4
49b888d
17172e1
c8e300d
faafb1b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,6 +219,13 @@ def transform_snowflake(config: Dict[str, Any]): | |
dbt_config["oauth_client_id"] = credentials["client_id"] | ||
dbt_config["oauth_client_secret"] = credentials["client_secret"] | ||
dbt_config["token"] = credentials["refresh_token"] | ||
elif credentials.get("private_key"): | ||
f = open("private_key_path.txt", "w") | ||
f.write(credentials["private_key"]) | ||
f.close() | ||
dbt_config["private_key_path"] = "private_key_path.txt" | ||
if credentials.get("passphrase"): | ||
dbt_config["private_key_passphrase"] = credentials["passphrase"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting that the authentication options that will be added to the Snowflake Destination will be called "private_key" and "passphrase". Does this match other destinations? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "private_key" - is widely used in other connectors, "passphrase" - is just snowflake terminology, renamed it to password @evantahler |
||
elif credentials.get("password"): | ||
dbt_config["password"] = credentials["password"] | ||
else: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: prefer
with open()... as f
overopen()... close()
; this is basically equivalent to Java'stry (OutputStream s = ...)
:(then you don't need to
f.close()
at all)