-
Notifications
You must be signed in to change notification settings - Fork 998
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a specific error for missing columns during materialization (#1619)
* Add a specific error for missing columns during materialization Signed-off-by: Achal Shah <[email protected]> * make format Signed-off-by: Achal Shah <[email protected]> * Be more specific about dataframe Signed-off-by: Achal Shah <[email protected]> * Update error message Signed-off-by: Achal Shah <[email protected]> * format Signed-off-by: Achal Shah <[email protected]>
- Loading branch information
Showing
5 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
sdk/python/tests/example_feature_repo_with_entity_join_key.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
from google.protobuf.duration_pb2 import Duration | ||
|
||
from feast import Entity, Feature, FeatureView, ValueType | ||
from feast.data_source import FileSource | ||
|
||
driver_hourly_stats = FileSource( | ||
path="%PARQUET_PATH%", # placeholder to be replaced by the test | ||
event_timestamp_column="datetime", | ||
created_timestamp_column="created", | ||
) | ||
|
||
|
||
# The join key here is deliberately different from the parquet file to test the failure path. | ||
driver = Entity( | ||
name="driver_id", | ||
value_type=ValueType.INT64, | ||
description="driver id", | ||
join_key="driver", | ||
) | ||
|
||
|
||
driver_hourly_stats_view = FeatureView( | ||
name="driver_hourly_stats", | ||
entities=["driver_id"], | ||
ttl=Duration(seconds=86400 * 1), | ||
features=[ | ||
Feature(name="conv_rate", dtype=ValueType.FLOAT), | ||
Feature(name="acc_rate", dtype=ValueType.FLOAT), | ||
Feature(name="avg_daily_trips", dtype=ValueType.INT64), | ||
], | ||
online=True, | ||
input=driver_hourly_stats, | ||
tags={}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.