diff --git a/sdk/python/feast/infra/offline_stores/snowflake_source.py b/sdk/python/feast/infra/offline_stores/snowflake_source.py index c0b2417099..7ef2dbd6af 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: