Skip to content

Commit

Permalink
Fix get_table_query_string method for Snowflake datasource
Browse files Browse the repository at this point in the history
Signed-off-by: TomSteenbergen <tomsteenbergen1995@gmail.com>
  • Loading branch information
TomSteenbergen committed Apr 23, 2024
1 parent 9537946 commit 64848a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/python/feast/infra/offline_stores/snowflake_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 64848a2

Please sign in to comment.