Skip to content

Latest commit

 

History

History

ingest-json-files

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Ingesting JSON files

In this recipe we'll learn how to ingest JSON files.

Pinot Version 1.0.0
Schema config/schema.json
Table Config config/table.json
Ingestion Job config/job-spec.yml

This is the code for the following recipe: https://dev.startree.ai/docs/pinot/recipes/ingest-json-files


Clone this repository and navigate to this recipe:

git clone git@github.com:startreedata/pinot-recipes.git
cd pinot-recipes/recipes/ingest-json-files

Spin up a Pinot cluster using Docker Compose:

docker compose up

Open another tab to add the movies table:

docker run \
   --network json \
   -v $PWD/config:/config \
   apachepinot/pinot:1.0.0 AddTable \
     -tableConfigFile /config/table.json   \
     -schemaFile /config/schema.json \
     -controllerHost "pinot-controller-json" \
    -exec

Import data/ingest.json into Pinot:

docker run \
   --network json \
   -v $PWD/config:/config \
   -v $PWD/data:/data \
   apachepinot/pinot:1.0.0 LaunchDataIngestionJob \
     -jobSpecFile /config/job-spec.yml

Navigate to http://localhost:9000/#/query and run the following query:

select * 
from movies 
limit 10