@@ -82,7 +82,7 @@ online_store:
8282
8383from datetime import timedelta
8484
85- from feast import Entity, FeatureService, FeatureView, Field, FileSource, ValueType
85+ from feast import Entity, FeatureService, FeatureView, Field, FileSource
8686from feast.types import Float32, Int64
8787
8888# Read data from parquet files. Parquet is convenient for local development mode. For
@@ -98,7 +98,7 @@ driver_hourly_stats = FileSource(
9898# fetch features.
9999# Entity has a name used for later reference (in a feature view, eg)
100100# and join_key to identify physical field name used in storages
101- driver = Entity(name="driver", value_type=ValueType.INT64, join_keys=["driver_id"], description="driver id",)
101+ driver = Entity(name="driver", join_keys=["driver_id"], description="driver id",)
102102
103103# Our parquet files contain sample data that includes a driver_id column, timestamps and
104104# three feature column. Here we define a Feature View that will allow us to serve this
@@ -111,6 +111,7 @@ driver_hourly_stats_view = FeatureView(
111111 Field(name="conv_rate", dtype=Float32),
112112 Field(name="acc_rate", dtype=Float32),
113113 Field(name="avg_daily_trips", dtype=Int64),
114+ Field(name="driver_id", dtype=Int64),
114115 ],
115116 online=True,
116117 source=driver_hourly_stats,
@@ -165,7 +166,7 @@ feast apply
165166
166167from datetime import timedelta
167168
168- from feast import Entity, FeatureView, Field, FileSource, ValueType
169+ from feast import Entity, FeatureView, Field, FileSource
169170from feast.types import Float32, Int64
170171
171172# Read data from parquet files. Parquet is convenient for local development mode. For
@@ -181,7 +182,7 @@ driver_hourly_stats = FileSource(
181182# fetch features.
182183# Entity has a name used for later reference (in a feature view, eg)
183184# and join_key to identify physical field name used in storages
184- driver = Entity(name = " driver" , value_type = ValueType. INT64 , join_keys = [" driver_id" ], description = " driver id" ,)
185+ driver = Entity(name = " driver" , join_keys = [" driver_id" ], description = " driver id" ,)
185186
186187# Our parquet files contain sample data that includes a driver_id column, timestamps and
187188# three feature column. Here we define a Feature View that will allow us to serve this
@@ -194,6 +195,7 @@ driver_hourly_stats_view = FeatureView(
194195 Field(name = " conv_rate" , dtype = Float32),
195196 Field(name = " acc_rate" , dtype = Float32),
196197 Field(name = " avg_daily_trips" , dtype = Int64),
198+ Field(name = " driver_id" , dtype = Int64),
197199 ],
198200 online = True ,
199201 source = driver_hourly_stats,
0 commit comments