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.
- Navigate to the recipe by running the following command:
Launch Pinot Cluster
You can spin up a Pinot Cluster and Kafka Broker by running the following command:Controller configuration
We need to provide configuration parameters to the Pinot Controller to enable Groovy in transformation functions. This is done in the following section of the Docker Compose file:/config/controller-conf.conf, the contents of which are shown below:
Dataset
We’re going to import a couple of JSON documents into Kafka and then from there into Pinot.Pinot Schema and Table
Now let’s create a Pinot Schema and Table. Only the timestamp field from our data source maps to a schema column name - we’ll be using transformation functions to populate the id and name columns.events topic:
ingestionConfig.transformConfigs:
- The id one extracts
payload.after.idif theafterproperty exists, otherwise it usespayload.before.id - The name one concatenates
payload.firstNameandpayload.lastName
If you only need to do simple data transformation, you can use the built-in transformation functions.
Ingest Data into Kafka
We can run the following command to import a couple of documents into Kafka:Querying
Once that’s completed, navigate to localhost:9000/#/query and click on theevents table or copy/paste the following query:
Query Results

