Pinot Input Format

Pinot Input format is a set of plugins with the goal of reading data from files during data ingestion. It can be split into two additional types: record encoders (for batch jobs) and decoders (for ingestion).

Currently supported Pinot Input Formats:

  • Batch

    • Avro

    • CSV

    • JSON

    • ORC


    • THRIFT

  • Streaming

    • Avro

    • Avro Confluent

      • To use the avro confluent stream decoder, the realtime table configuration should point to the streamConfigs section of tableIndexConfig should point to the avro confluent stream decoder. Here is an example configuration:

"streamConfigs": {
"streamType": "kafka",
"stream.kafka.consumer.type": "LowLevel",
"": "kafka-topic",
"": "org.apache.pinot.plugin.inputformat.avro.confluent.KafkaConfluentSchemaRegistryAvroMessageDecoder",
"": "",
"": "http://<schema registry host>:8081",
"": "<zk broker url>/",
"": "<kafka broker url>",
"realtime.segment.flush.threshold.time": "24h",
"realtime.segment.flush.threshold.size": "0",
"realtime.segment.flush.desired.size": "150M",
"": "read_committed",
"": "smallest",
"": "<group id>",
"": "<client id>"

  • Protocol Buffers To ingest data in protocol buffers format, the following config needs to be added in the ingestion spec

    name: 'standalone'
    segmentGenerationJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentGenerationJobRunner'
    segmentTarPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentTarPushJobRunner'
    segmentUriPushJobRunnerClassName: 'org.apache.pinot.plugin.ingestion.batch.standalone.SegmentUriPushJobRunner'
    jobType: SegmentCreationAndTarPush
    inputDirURI: 'file:///path/to/input'
    includeFileNamePattern: 'glob:**/*.parquet'
    excludeFileNamePattern: 'glob:**/*.avro'
    outputDirURI: 'file:///path/to/output'
    overwriteOutput: true
    - scheme: file
    className: org.apache.pinot.spi.filesystem.LocalPinotFS
    dataFormat: 'proto'
    className: 'org.apache.pinot.plugin.inputformat.protobuf.ProtoBufRecordReader'
    configClassName: 'org.apache.pinot.plugin.inputformat.protobuf.ProtoBufRecordReaderConfig'
    descriptorFile: 'file:///path/to/sample.desc
    tableName: 'myTable'
    schemaURI: 'http://localhost:9000/tables/myTable/schema'
    tableConfigURI: 'http://localhost:9000/tables/myTable'
    - controllerURI: 'localhost:9000'
    pushAttempts: 2

The descriptorFile contains all of the descriptors of a .proto file. It should be an URI pointing to the location of the .desc file for a corresponding .proto file. You can generate the descriptor file from a .proto file using the command

protoc -I=/directory/containing/proto/files--include_imports -- descriptor_set_out=/path/to/sample.desc /path/to/sample.proto