Skip to content

Commit de2d304

Browse files
authored
docs: Update Streaming feature computation with Denormalized entry (#4760)
docs: update Streaming feature computation with Denormalized Signed-off-by: Matt Green <emgeee@users.noreply.github.com>
1 parent dd7bcba commit de2d304

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

docs/reference/denormalized.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Denormalized makes it easy to compute real-time features and write them directly
66

77
## Prerequisites
88

9-
- Python 3.8+
10-
- Kafka cluster (local or remote)
9+
- Python 3.12+
10+
- Kafka cluster (local or remote) OR docker installed
1111

1212
For a full working demo, check out the [feast-example](https://github.com/probably-nothing-labs/feast-example) repo.
1313

@@ -39,6 +39,13 @@ my-feature-project/
3939
└── main.py # Pipeline runner
4040
```
4141

42+
3. Run a test Kafka instance in docker
43+
44+
`docker run --rm -p 9092:9092 emgeee/kafka_emit_measurements:latest`
45+
46+
This will spin up a docker container that runs a kafka instance and run a simple script to emit fake data to two topics.
47+
48+
4249
## Define Your Features
4350

4451
In `feature_repo/sensor_data.py`, define your feature view and entity:
@@ -85,7 +92,7 @@ sample_event = {
8592
}
8693

8794
# Create a stream from your Kafka topic
88-
ds = FeastDataStream(Context().from_topic("temperature", json.dumps(sample_event), "localhost:9092"))
95+
ds = FeastDataStream(Context().from_topic("temperature", json.dumps(sample_event), "localhost:9092", "occurred_at_ms"))
8996

9097
# Define your feature computations
9198
ds = ds.window(
@@ -106,7 +113,9 @@ feature_store = FeatureStore(repo_path="feature_repo/")
106113
ds.write_feast_feature(feature_store, "push_sensor_statistics")
107114
```
108115

116+
117+
109118
## Need Help?
110119

111120
- Email us at hello@denormalized.io
112-
- Check out more examples on our [GitHub](https://github.com/probably-nothing-labs/denormalized)
121+
- Check out more examples on our [GitHub](https://github.com/probably-nothing-labs/denormalized/tree/main/py-denormalized/python/examples)

0 commit comments

Comments
 (0)