For the complete documentation index, see llms.txt. This page is also available as Markdown.

Flink Connector

Apache Flink connector for writing data directly into Apache Pinot tables, supporting offline, realtime, and upsert table types.

The Pinot Flink Connector provides a PinotSink that plugs into any Flink streaming or batch job to generate Pinot segments in-process and upload them directly to the cluster. It supports offline tables, realtime tables, and full-upsert tables.

Requirements

  • Flink 2.2.0 or later – The connector requires Flink 2.x and supports Java 21.

  • Java 11+ – Prior versions: Java 8 support ended with Flink 1.x.

Note: If you're using Flink 1.x, use Pinot version 1.5.0 or earlier. Pinot 1.6.0+ requires Flink 2.x.

Use Cases

  • Offline table backfill -- Populate or refresh an offline table from a data lake, database export, or any Flink-readable source.

  • Upsert table bootstrapping -- Seed a realtime upsert table with historical data while preserving correct partition assignment and comparison-column ordering.

  • ETL and enrichment pipelines -- Embed Pinot writes inside a larger Flink DAG that joins, filters, or enriches data before loading.

Capability

Flink Connector

Spark Batch Ingestion

Standalone LaunchDataIngestionJob

Processing framework

Apache Flink (streaming or batch)

Apache Spark

None (standalone Java process)

Upsert table backfill

Yes -- generates correctly partitioned uploaded-realtime segments

Not natively supported

Not natively supported

Custom transformation logic

Full Flink API (joins, windows, aggregations)

Full Spark API

Limited to ingestion config transforms

Cluster dependency

Requires a Flink cluster or local Flink environment

Requires a Spark cluster

Runs as a single JVM process

Typical data sources

Kafka, data lake files, JDBC, any Flink source

HDFS, S3, GCS, any Spark source

Local/remote files (CSV, JSON, Avro, Parquet, ORC, Thrift)

Best for

Teams already running Flink; upsert backfill scenarios

Teams already running Spark; large-scale batch loads

Simple one-off or scheduled loads without a processing framework

Maven Dependency

Replace ${pinot.version} with your Pinot release version. Check Apache Pinot releases for the latest stable version.

The artifact is published to the Apache Maven repository and transitively includes the Pinot admin client, segment writer, and Flink 2.x core dependencies.

Quick Example

Full Configuration Reference

For complete configuration details, including upsert partitioning requirements, segment flush control, segment naming, and realtime table support, see the Flink batch ingestion reference.

Deprecated: The legacy PinotSinkFunction (based on Flink 1.x SinkFunction API) is deprecated and no longer functional with Flink 2.x. Update your code to use PinotSink and the sinkTo() API.

For help migrating, refer to the updated Flink batch ingestion examples.

Additional Resources

Last updated

Was this helpful?