From 10ce2aa0050e419acfae27971a6fff87bade3ba4 Mon Sep 17 00:00:00 2001 From: nanohanno <44575187+nanohanno@users.noreply.github.com> Date: Fri, 4 Oct 2024 16:18:43 +0200 Subject: [PATCH] feat: Add connection_name field to Snowflake config (#4600) Add connection_name field to Snowflake config Signed-off-by: hkuepers Co-authored-by: hkuepers --- sdk/python/feast/infra/materialization/snowflake_engine.py | 5 ++++- sdk/python/feast/infra/offline_stores/snowflake.py | 5 ++++- sdk/python/feast/infra/online_stores/snowflake.py | 5 ++++- sdk/python/feast/infra/registry/snowflake.py | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/sdk/python/feast/infra/materialization/snowflake_engine.py b/sdk/python/feast/infra/materialization/snowflake_engine.py index 600e1b20d8..3b789a3e5d 100644 --- a/sdk/python/feast/infra/materialization/snowflake_engine.py +++ b/sdk/python/feast/infra/materialization/snowflake_engine.py @@ -46,7 +46,10 @@ class SnowflakeMaterializationEngineConfig(FeastConfigBaseModel): """ Type selector""" config_path: Optional[str] = os.path.expanduser("~/.snowsql/config") - """ Snowflake config path -- absolute path required (Cant use ~)""" + """ Snowflake snowsql config path -- absolute path required (Cant use ~)""" + + connection_name: Optional[str] = None + """ Snowflake connector connection name -- typically defined in ~/.snowflake/connections.toml """ account: Optional[str] = None """ Snowflake deployment identifier -- drop .snowflakecomputing.com""" diff --git a/sdk/python/feast/infra/offline_stores/snowflake.py b/sdk/python/feast/infra/offline_stores/snowflake.py index 9418171a96..3d23682769 100644 --- a/sdk/python/feast/infra/offline_stores/snowflake.py +++ b/sdk/python/feast/infra/offline_stores/snowflake.py @@ -83,7 +83,10 @@ class SnowflakeOfflineStoreConfig(FeastConfigBaseModel): """ Offline store type selector """ config_path: Optional[str] = os.path.expanduser("~/.snowsql/config") - """ Snowflake config path -- absolute path required (Cant use ~)""" + """ Snowflake snowsql config path -- absolute path required (Cant use ~)""" + + connection_name: Optional[str] = None + """ Snowflake connector connection name -- typically defined in ~/.snowflake/connections.toml """ account: Optional[str] = None """ Snowflake deployment identifier -- drop .snowflakecomputing.com """ diff --git a/sdk/python/feast/infra/online_stores/snowflake.py b/sdk/python/feast/infra/online_stores/snowflake.py index 6f39bdd0f6..d07066de12 100644 --- a/sdk/python/feast/infra/online_stores/snowflake.py +++ b/sdk/python/feast/infra/online_stores/snowflake.py @@ -30,7 +30,10 @@ class SnowflakeOnlineStoreConfig(FeastConfigBaseModel): """ Online store type selector """ config_path: Optional[str] = os.path.expanduser("~/.snowsql/config") - """ Snowflake config path -- absolute path required (Can't use ~)""" + """ Snowflake snowsql config path -- absolute path required (Cant use ~)""" + + connection_name: Optional[str] = None + """ Snowflake connector connection name -- typically defined in ~/.snowflake/connections.toml """ account: Optional[str] = None """ Snowflake deployment identifier -- drop .snowflakecomputing.com """ diff --git a/sdk/python/feast/infra/registry/snowflake.py b/sdk/python/feast/infra/registry/snowflake.py index e68d9d64b5..06403fe9ae 100644 --- a/sdk/python/feast/infra/registry/snowflake.py +++ b/sdk/python/feast/infra/registry/snowflake.py @@ -80,7 +80,10 @@ class SnowflakeRegistryConfig(RegistryConfig): """ Registry type selector """ config_path: Optional[str] = os.path.expanduser("~/.snowsql/config") - """ Snowflake config path -- absolute path required (Cant use ~) """ + """ Snowflake snowsql config path -- absolute path required (Cant use ~)""" + + connection_name: Optional[str] = None + """ Snowflake connector connection name -- typically defined in ~/.snowflake/connections.toml """ account: Optional[str] = None """ Snowflake deployment identifier -- drop .snowflakecomputing.com """