Pinot Version | 1.0.0 |
---|---|
Code | startreedata/pinot-recipes/filtering |
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:Dataset
We’re going to import the following JSON file:Pinot Schema and Table
Now let’s create a Pinot Schema and Table. First, the schema:year
property with a value of 2010 or more are not imported.
You can create the table and schema by running the following command:`
Ingestion Job
Now we’re going to import the JSON file into Pinot. We’ll do this with the following ingestion spec:movies
schema. If one of the fields doesn’t exist in the schema it will be skipped.
You can also apply transformation functions to JSON documents during the ingestion process.
For more details, see the JSON Transformation Functions guide.
Querying
Once that’s completed, navigate to localhost:9000/#/query and click on themovies
table or copy/paste the following query:
genre | id | title | year |
---|---|---|---|
Comedy | 332567813147483648 | The Ugly Truth | 2009 |
Romance | 346905752147483649 | P.S. I Love You | 2007 |
Fantasy | 394030854147483651 | The Curious Case of Benjamin Button | 2008 |