@@ -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
1212For 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
4451In ` 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
9198ds = ds.window(
@@ -106,7 +113,9 @@ feature_store = FeatureStore(repo_path="feature_repo/")
106113ds.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