Skip to content

Commit 7c9827a

Browse files
committed
Update source.py
1 parent ec4012c commit 7c9827a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

feathr_project/feathr/definition/source.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,10 @@ def __init__(self, name: str, database: str, schema: str, dbtable: Optional[str]
163163
raise RuntimeError("One of dbtable or query must be specified..")
164164
if dbtable is not None:
165165
self.dbtable = dbtable
166+
self.query = None
166167
if query is not None:
167168
self.query = query
169+
self.dbtable = None
168170
self.database = database
169171
self.schema = schema
170172
self.path = self._get_snowflake_path()
@@ -173,7 +175,7 @@ def _get_snowflake_path(self) -> str:
173175
"""
174176
Returns snowflake path for registry.
175177
"""
176-
if self.dbtable:
178+
if self.dbtable is not None:
177179
return f"snowflake://snowflake_account/?sfDatabase={self.database}&sfSchema={self.schema}&dbtable={self.dbtable}"
178180
else:
179181
return f"snowflake://snowflake_account/?sfDatabase={self.database}&sfSchema={self.schema}&query={self.query}"

0 commit comments

Comments
 (0)