Skip to content

Commit 3ce5139

Browse files
kfiringkevjumba
andauthored
fix: Spark source support table with pattern "db.table" (#2606)
* 1. fix: spark source support table with pattern "db.table" (#2605 #2605) Signed-off-by: Kevin Zhang <kzhang@tecton.ai> * Fix lint Signed-off-by: Kevin Zhang <kzhang@tecton.ai> Co-authored-by: leonpeng <kfiring> Co-authored-by: Kevin Zhang <kzhang@tecton.ai>
1 parent e4507ac commit 3ce5139

File tree

1 file changed

+2
-1
lines changed
  • sdk/python/feast/infra/offline_stores/contrib/spark_offline_store

1 file changed

+2
-1
lines changed

sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark_source.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ def get_table_query_string(self) -> str:
177177
"""Returns a string that can directly be used to reference this table in SQL"""
178178
if self.table:
179179
# Backticks make sure that spark sql knows this a table reference.
180-
return f"`{self.table}`"
180+
table = ".".join([f"`{x}`" for x in self.table.split(".")])
181+
return table
181182
if self.query:
182183
return f"({self.query})"
183184

0 commit comments

Comments
 (0)