Skip to content

Commit f453ff7

Browse files
committed
Fix docs
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
1 parent f27ed49 commit f453ff7

4 files changed

Lines changed: 17 additions & 14 deletions

File tree

docs/getting-started/concepts/feature-view.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,17 @@ It is suggested that you dynamically specify the new FeatureView name using `.wi
7474
{% tabs %}
7575
{% tab title="location_stats_feature_view.py" %}
7676
```python
77-
from feast import BigQuerySource, Entity, FeatureView, Field, ValueType
78-
from feast.types import Int32
77+
from feast import BigQuerySource, Entity, FeatureView, Field
78+
from feast.types import Int32, Int64
7979

80-
location = Entity(name="location", join_keys=["location_id"], value_type=ValueType.INT64)
80+
location = Entity(name="location", join_keys=["location_id"])
8181

8282
location_stats_fv= FeatureView(
8383
name="location_stats",
8484
entities=["location"],
8585
schema=[
86-
Field(name="temperature", dtype=Int32)
86+
Field(name="temperature", dtype=Int32),
87+
Field(name="location", dtype=Int64),
8788
],
8889
source=BigQuerySource(
8990
table="feast-oss.demo_data.location_stats"

docs/getting-started/quickstart.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ online_store:
8282

8383
from datetime import timedelta
8484

85-
from feast import Entity, FeatureService, FeatureView, Field, FileSource, ValueType
85+
from feast import Entity, FeatureService, FeatureView, Field, FileSource
8686
from 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

166167
from datetime import timedelta
167168

168-
from feast import Entity, FeatureView, Field, FileSource, ValueType
169+
from feast import Entity, FeatureView, Field, FileSource
169170
from 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,

docs/reference/feature-repository.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ A feature repository can also contain one or more Python files that contain feat
8989
```python
9090
from datetime import timedelta
9191
92-
from feast import BigQuerySource, Entity, Feature, FeatureView, Field, ValueType
93-
from feast.types import Float32, String
92+
from feast import BigQuerySource, Entity, Feature, FeatureView, Field
93+
from feast.types import Float32, Int64, String
9494
9595
driver_locations_source = BigQuerySource(
9696
table="rh_prod.ride_hailing_co.drivers",
@@ -100,7 +100,6 @@ driver_locations_source = BigQuerySource(
100100
101101
driver = Entity(
102102
name="driver",
103-
value_type=ValueType.INT64,
104103
description="driver id",
105104
)
106105
@@ -111,6 +110,7 @@ driver_locations = FeatureView(
111110
schema=[
112111
Field(name="lat", dtype=Float32),
113112
Field(name="lon", dtype=String),
113+
Field(name="driver", dtype=Int64),
114114
],
115115
source=driver_locations_source,
116116
)

docs/reference/feature-repository/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ A feature repository can also contain one or more Python files that contain feat
9494
```python
9595
from datetime import timedelta
9696
97-
from feast import BigQuerySource, Entity, Feature, FeatureView, Field, ValueType
98-
from feast.types import Float32, String
97+
from feast import BigQuerySource, Entity, Feature, FeatureView, Field
98+
from feast.types import Float32, Int64, String
9999
100100
driver_locations_source = BigQuerySource(
101101
table_ref="rh_prod.ride_hailing_co.drivers",
@@ -105,7 +105,6 @@ driver_locations_source = BigQuerySource(
105105
106106
driver = Entity(
107107
name="driver",
108-
value_type=ValueType.INT64,
109108
description="driver id",
110109
)
111110
@@ -116,6 +115,7 @@ driver_locations = FeatureView(
116115
schema=[
117116
Field(name="lat", dtype=Float32),
118117
Field(name="lon", dtype=String),
118+
Field(name="driver", dtype=Int64),
119119
],
120120
source=driver_locations_source,
121121
)

0 commit comments

Comments
 (0)