-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
Expected Behavior
Retrieving training data from an offline store that is BigQuery by using get_historical_features method from Python SDK.
Current Behavior
Getting this error when running get_historical_features:
Traceback (most recent call last):
File "get_offline_data.py", line 22, in <module>
"item_user_stats_v1:is_high_risk_seller",
File "/usr/local/lib/python3.7/site-packages/feast/infra/offline_stores/offline_store.py", line 77, in to_df
features_df = self._to_df_internal()
File "/usr/local/lib/python3.7/site-packages/feast/infra/offline_stores/bigquery.py", line 290, in _to_df_internal
df = self._execute_query(query).to_dataframe(create_bqstorage_client=True)
File "/usr/local/lib/python3.7/site-packages/feast/usage.py", line 280, in wrapper
raise exc.with_traceback(traceback)
File "/usr/local/lib/python3.7/site-packages/feast/usage.py", line 269, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/feast/infra/offline_stores/bigquery.py", line 357, in _execute_query
block_until_done(client=self.client, bq_job=bq_job, timeout=timeout)
File "/usr/local/lib/python3.7/site-packages/feast/infra/offline_stores/bigquery.py", line 415, in block_until_done
raise bq_job.exception()
google.api_core.exceptions.BadRequest: 400 No matching signature for operator <= for argument types: TIMESTAMP, DATETIME. Supported signature: ANY <= ANY at [78:13]The error happens on a query where it compares event timestamps (last line):
item_user_stats_v1__base AS (
SELECT
subquery.*,
entity_dataframe.entity_timestamp,
entity_dataframe.item_user_stats_v1__entity_row_unique_id
FROM item_user_stats_v1__subquery AS subquery
INNER JOIN item_user_stats_v1__entity_dataframe AS entity_dataframe
ON TRUE
AND subquery.event_timestamp <= entity_dataframe.entity_timestampSteps to reproduce
Use Feast project with GCP provider, where the offline store is BigQuery. After installing feast[gcp] (v0.19.4) packages you should get this google-cloud-bigquery==3.0.1 dependency version. I think it should brake also with newer versions of google-cloud-bigquery if it will be available.
Specifications
- Version: v0.19.4
- Platform: GCP
- Subsystem:
Possible Solution
Quick solution: add upper bound of <3.0.0 here.
A better solution: check what is causing this event timestamp type mismatch and fix it 😊 .