Skip to main content

Prerequisites

You will need a running Pinot cluster locally to follow the code examples in this guide. Make sure you have the following configured in the machine that you are going to deploy Apache Pinot.

Create an S3 bucket

Let’s create an S3 bucket called pinot-demo to keep the source CSV files. You can use the AWS CLI to do that.

Copy CSV files

Create a CSV file called transcript.csv with the following content.
Now, copy that file into S3 bucket using the CLI.

Configure Pinot

Now that we have the CSV file in the S3 bucket. Let’s configure Pinot to ingest it and create a segment out of it. First, let’s create a schema and a table definition for the transcript data set. Create the transcript_schema.json as follows.
Create the transcript_table.json as follows.
Upload the table using following command.

Create the ingestion job spec file

Create a file called job-spec.yml and add the following content to it.
Let’s break down this specification further for better understanding. The following configuration block instructs Pinot to use S3 as the underlying file system implementation, with the className pointing to the implementation class.
Below, inputDirURI specifies the S3 bucket location where Pinot should ingest the data from. If you remember, we copied the transcript.csv file into that folder. The directive includeFileNamePattern filters all CSV files in that folder. Once the ingestion is completed, Pinot writes the segments into the location specified by outputDirURI
We are reading CSV files. Hence, the following configuration block uses the CSV record reader format.

Initiate the ingestion job

Now we have everything in place. Let’s go ahead and kick off the ingestion by running:
Once it is completed, you should see the transcript table populated with data in the Query Console.