Prerequisites
To follow the code examples in this guide, you must install Docker locally and download recipes.Navigate to recipe
- If you haven’t already, download recipes.
- In terminal, go to the recipe by running the following command:
Launch Pinot Cluster
You can spin up a Pinot Cluster by running the following command:Data Generator
This recipe contains a data generator that creates events with data about people. It uses the Faker library, so you’ll first need to install that:Avro Schema
The Avro schema for our messages is described below:Kafka ingestion
We’re going to ingest the stream of people into Kafka using the Kafka Python client. We’ll need to install the following libraries:datagen.py into the following script:
stdin and writes Avro messages to Kafka.
We can combine the data generator script with this one by running the following code:
person-topic using kcat:
Pinot schema and table
Our Pinot schema is shown below:Querying Pinot
We can then run the following query via the Pinot UI:
Query Results

