From 21dd7f83fc0adfa7914175102b65cd477b4ef6f4 Mon Sep 17 00:00:00 2001 From: TomSteenbergen Date: Tue, 23 Apr 2024 08:09:30 +0200 Subject: [PATCH] Fix get_table_query_string method for Snowflake datasource Signed-off-by: TomSteenbergen --- sdk/python/feast/infra/offline_stores/snowflake_source.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/snowflake_source.py b/sdk/python/feast/infra/offline_stores/snowflake_source.py index c0b24170996..1985456e58a 100644 --- a/sdk/python/feast/infra/offline_stores/snowflake_source.py +++ b/sdk/python/feast/infra/offline_stores/snowflake_source.py @@ -191,8 +191,10 @@ def validate(self, config: RepoConfig): def get_table_query_string(self) -> str: """Returns a string that can directly be used to reference this table in SQL.""" - if self.database and self.table: + if self.database and self.schema and self.table: return f'"{self.database}"."{self.schema}"."{self.table}"' + elif self.schema and self.table: + return f'"{self.schema}.{self.table}"' elif self.table: return f'"{self.table}"' else: