|
16 | 16 |
|
17 | 17 |
|
18 | 18 | # Entity definitions
|
19 |
| -driver = Entity(name="driver_id", value_type=ValueType.INT64, description="driver id",) |
| 19 | +driver = Entity(name="driver", value_type=ValueType.INT64, description="driver id",) |
20 | 20 | customer = Entity(
|
21 |
| - name="customer_id", value_type=ValueType.INT64, description="customer id", |
| 21 | + name="customer", value_type=ValueType.INT64, description="customer id", |
22 | 22 | )
|
23 | 23 |
|
24 | 24 | # Sources
|
|
40 | 40 | # Feature Views
|
41 | 41 | driver_hourly_stats_view = FeatureView(
|
42 | 42 | name="driver_hourly_stats",
|
43 |
| - entities=["driver_id"], |
| 43 | + entities=["driver"], |
44 | 44 | ttl=timedelta(days=7),
|
45 | 45 | schema=[
|
46 | 46 | Field(name="conv_rate", dtype=Float32),
|
47 | 47 | Field(name="acc_rate", dtype=Float32),
|
48 | 48 | Field(name="avg_daily_trips", dtype=Int64),
|
49 | 49 | ],
|
50 | 50 | online=True,
|
51 |
| - batch_source=driver_hourly_stats, |
| 51 | + source=driver_hourly_stats, |
52 | 52 | tags={},
|
53 | 53 | )
|
54 | 54 | customer_daily_profile_view = FeatureView(
|
55 | 55 | name="customer_daily_profile",
|
56 |
| - entities=["customer_id"], |
| 56 | + entities=["customer"], |
57 | 57 | ttl=timedelta(days=7),
|
58 | 58 | schema=[
|
59 | 59 | Field(name="current_balance", dtype=Float32),
|
60 | 60 | Field(name="avg_passenger_count", dtype=Float32),
|
61 | 61 | Field(name="lifetime_trip_count", dtype=Int64),
|
62 | 62 | ],
|
63 | 63 | online=True,
|
64 |
| - batch_source=customer_daily_profile, |
| 64 | + source=customer_daily_profile, |
65 | 65 | tags={},
|
66 | 66 | )
|
0 commit comments