Skip to content

Commit

Permalink
fix bigquery source
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Chiao <danny@tecton.ai>
  • Loading branch information
adchia committed Mar 2, 2022
1 parent d35fd9a commit aad4b77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sdk/python/feast/infra/offline_stores/bigquery_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@ def __init__(
"""
if table is None and table_ref is None and query is None:
raise ValueError('No "table" argument provided.')
if table_ref:
if not table and table_ref:
warnings.warn(
(
"The argument 'table_ref' is being deprecated. Please use 'table' "
"instead. Feast 0.20 and onwards will not support the argument 'table_ref'."
),
DeprecationWarning,
)
table = table_ref
self.bigquery_options = BigQueryOptions(table_ref=table, query=query)

# If no name, use the table_ref as the default name
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/tests/example_repos/example_feature_repo_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
)

driver_locations_source = BigQuerySource(
table_ref="feast-oss.public.drivers",
table="feast-oss.public.drivers",
event_timestamp_column="event_timestamp",
created_timestamp_column="created_timestamp",
)
Expand Down

0 comments on commit aad4b77

Please sign in to comment.