File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ def __init__(
28
28
# TODO: Remove this once we remove the API key auth from snowflake
29
29
api_key : Optional [str ] = None ,
30
30
check_server_ready : bool = True ,
31
+ * ,
32
+ snowflake_authenticator : Optional [str ] = None ,
31
33
) -> None :
32
34
assert (
33
35
snowflake_password is not None or snowflake_private_key is not None
@@ -40,6 +42,7 @@ def __init__(
40
42
self .snowflake_user = snowflake_user
41
43
self .snowflake_password = snowflake_password
42
44
self .snowflake_private_key = snowflake_private_key
45
+ self .snowflake_authenticator = snowflake_authenticator
43
46
44
47
self ._auth_token = None
45
48
self ._last_auth_token_fetch : Optional [datetime .datetime ] = None
@@ -86,6 +89,8 @@ def _get_auth_token(self) -> str:
86
89
format = serialization .PrivateFormat .PKCS8 ,
87
90
encryption_algorithm = serialization .NoEncryption (),
88
91
)
92
+ if self .snowflake_authenticator is not None :
93
+ connect_params ["authenticator" ] = self .snowflake_authenticator
89
94
90
95
ctx = snowflake .connector .connect (** connect_params )
91
96
ctx ._all_async_queries_finished = lambda : False # type: ignore
You can’t perform that action at this time.
0 commit comments