Skip to content

Commit 74c75f1

Browse files
authored
feat: Add authentication option for snowflake connector (#3039)
Signed-off-by: Lisa Aiken <laiken@manifold.ai> Signed-off-by: Lisa Aiken <laiken@manifold.ai>
1 parent 8527457 commit 74c75f1

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

sdk/python/feast/infra/offline_stores/snowflake.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ class SnowflakeOfflineStoreConfig(FeastConfigBaseModel):
9191
schema_: Optional[str] = Field(None, alias="schema")
9292
""" Snowflake schema name """
9393

94+
authenticator: Optional[str] = None
95+
""" Snowflake authenticator name """
96+
9497
storage_integration_name: Optional[str] = None
9598
""" Storage integration name in snowflake """
9699

sdk/python/feast/infra/offline_stores/snowflake_source.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,11 @@ class SavedDatasetSnowflakeStorage(SavedDatasetStorage):
298298

299299
def __init__(self, table_ref: str):
300300
self.snowflake_options = SnowflakeOptions(
301-
database=None, schema=None, table=table_ref, query=None, warehouse=None
301+
database=None,
302+
schema=None,
303+
table=table_ref,
304+
query=None,
305+
warehouse=None,
302306
)
303307

304308
@staticmethod

sdk/python/feast/infra/online_stores/snowflake.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ class SnowflakeOnlineStoreConfig(FeastConfigBaseModel):
5353
schema_: Optional[str] = Field("PUBLIC", alias="schema")
5454
""" Snowflake schema name """
5555

56+
authenticator: Optional[str] = None
57+
""" Snowflake authenticator name """
58+
5659
class Config:
5760
allow_population_by_field_name = True
5861

sdk/python/feast/infra/utils/snowflake_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def get_snowflake_conn(config, autocommit=True) -> SnowflakeConnection:
8383

8484
try:
8585
conn = snowflake.connector.connect(
86-
application="feast", autocommit=autocommit, **kwargs
86+
application="feast",
87+
autocommit=autocommit,
88+
**kwargs,
8789
)
8890

8991
return conn

0 commit comments

Comments
 (0)