File tree 4 files changed +13
-0
lines changed
4 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -103,12 +103,17 @@ from feast import (
103
103
FeatureView,
104
104
Field,
105
105
FileSource,
106
+ Project,
106
107
PushSource,
107
108
RequestSource,
108
109
)
109
110
from feast.on_demand_feature_view import on_demand_feature_view
110
111
from feast.types import Float32, Float64, Int64
111
112
113
+ # Define a project for the feature repo
114
+ project = Project(name="my_project", description="A project for driver statistics")
115
+
116
+
112
117
# Define an entity for the driver. You can think of an entity as a primary key used to
113
118
# fetch features.
114
119
driver = Entity(name="driver", join_keys=["driver_id"])
Original file line number Diff line number Diff line change 18
18
from .feature_view import FeatureView
19
19
from .field import Field
20
20
from .on_demand_feature_view import OnDemandFeatureView
21
+ from .project import Project
21
22
from .repo_config import RepoConfig
22
23
from .stream_feature_view import StreamFeatureView
23
24
from .value_type import ValueType
49
50
"PushSource" ,
50
51
"RequestSource" ,
51
52
"AthenaSource" ,
53
+ "Project" ,
52
54
]
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ def bootstrap():
10
10
from feast .driver_test_data import create_driver_hourly_stats_df
11
11
12
12
repo_path = pathlib .Path (__file__ ).parent .absolute () / "feature_repo"
13
+ project_name = pathlib .Path (__file__ ).parent .absolute ().name
13
14
data_path = repo_path / "data"
14
15
data_path .mkdir (exist_ok = True )
15
16
@@ -23,6 +24,7 @@ def bootstrap():
23
24
driver_df .to_parquet (path = str (driver_stats_path ), allow_truncated_timestamps = True )
24
25
25
26
example_py_file = repo_path / "example_repo.py"
27
+ replace_str_in_file (example_py_file , "%PROJECT_NAME%" , str (project_name ))
26
28
replace_str_in_file (example_py_file , "%PARQUET_PATH%" , str (driver_stats_path ))
27
29
replace_str_in_file (example_py_file , "%LOGGING_PATH%" , str (data_path ))
28
30
Original file line number Diff line number Diff line change 10
10
FeatureView ,
11
11
Field ,
12
12
FileSource ,
13
+ Project ,
13
14
PushSource ,
14
15
RequestSource ,
15
16
)
18
19
from feast .on_demand_feature_view import on_demand_feature_view
19
20
from feast .types import Float32 , Float64 , Int64
20
21
22
+ # Define a project for the feature repo
23
+ project = Project (name = "%PROJECT_NAME%" , description = "A project for driver statistics" )
24
+
21
25
# Define an entity for the driver. You can think of an entity as a primary key used to
22
26
# fetch features.
23
27
driver = Entity (name = "driver" , join_keys = ["driver_id" ])
You can’t perform that action at this time.
0 commit comments