Updated on 2026-11-06 GMT+08:00

Paimon Functions

Apache Paimon is an open-source data lake storage system designed for streaming data processing and the lakehouse architecture. It combines the low-cost and open storage capabilities of data lakes with the real-time update and transactional consistency capabilities of databases, making it well-suited for scenarios such as real-time data warehouses, offline data warehouses, and unified batch-streaming processing.

Paimon adopts a storage structure similar to LSM-Tree, supporting high-throughput writes, primary key updates, deletions, partial updates, and data compaction. After data is written, it is organized through snapshots, manifest files, and data files. Each commit generates a consistent snapshot, enabling atomic commits, version management, time travel, and fault recovery. For primary key tables, Paimon merges multiple changes based on the primary key. This makes it ideal for processing database CDC data and directly building data lake tables that are updated in real time.

Paimon provides the following features:

  • Unified batch-streaming write: Supports continuous Flink streaming writes and Spark batch writes, allowing a single copy of data to serve both streaming and batch processing scenarios.
  • Real-time updates for primary key tables: Supports insert, update, and delete operations by primary key based on the LSM-Tree structure, making it suitable for CDC data ingestion and real-time aggregation.
  • Append-only tables: A table that does not support primary keys. It is suitable for logs and event streams where updates are not required. This mode offers higher write performance.
  • Time travel: Supports querying historical data through snapshots, which can be used for data auditing, historical comparison, and fault recovery.
  • Schema evolution: Supports schema changes such as adding columns, dropping columns, renaming columns, and changing column types, without rewriting data files.
  • Compaction: Merges small files into large ones to optimize query performance and storage efficiency. Both synchronous and asynchronous modes are supported.
  • Changelog Producer: Directly generates change logs from Paimon tables, allowing downstream systems to subscribe to incremental data for streaming processing.
  • Tag and Branch: Allows you to create tags and branches for table snapshots, facilitating version management and data rollback.

Highlights

  • Unified batch-streaming processing: The same dataset supports both streaming reads and batch queries, eliminating the need to maintain separate data pipelines.
  • High-throughput writes: Optimized write paths based on LSM-Tree support data write scenarios with millions of TPS.
  • Real-time updates: Primary key tables support update and delete operations by primary key, meeting the data change requirements of real-time data warehouses.
  • Open ecosystem: Deep integration with Flink and support for multiple compute engines such as Spark.
  • Transactional consistency: Each commit generates a consistent snapshot, providing ACID transaction guarantees and isolation for concurrent reads and writes.
  • Low-cost storage: The underlying storage is based on HDFS or object storage, combined with the columnar storage format, achieving both low costs and high performance.

Concepts

  • Table: A Paimon table is the basic organizational unit of data, containing information such as the schema, partitioning policies, primary key definitions, and attribute configurations. There are two types of tables: Append-Only tables and primary key tables.
  • Snapshot: A snapshot is a consistent view of a table at a specific point in time. Each commit generates a snapshot, which serves as the basis for time travel and concurrency control.
  • Schema: A schema describes the field definitions, data types, and field IDs of a table. Paimon uses field IDs to ensure data compatibility after schema evolution.
  • Manifest: A manifest records the metadata of data files, including the file paths, partition values, row counts, and column statistics. It is used for filtering and scan planning during queries.
  • Data file: A data file stores actual data, typically using columnar formats like ORC or Parquet.
  • Changelog: A changelog records data changes in a table. It is generated through the Changelog Producer mechanism for downstream streaming consumption.
  • Commit: An operation that atomically writes data changes to a table and generates a new snapshot. Paimon uses optimistic concurrency control to handle concurrent commits.

File Organization

Paimon separates data into the metadata management layer and data storage layer.

  • Metadata management layer:
    • Snapshot files: stored in JSON format, containing the current snapshot information, including the schema, partition specifications, references to all manifest files, and references to the previous snapshot. A new snapshot file is generated for each commit.
    • Manifest files: stored in Avro format, containing a list of data files. Each row records detailed information about a data file, including the file path, partition values, file size, row count, and column-level statistics (such as min/max values, null counts). This allows queries to filter out unnecessary files.
    • Manifest list files: stored in Avro format. A manifest list file is generated for each commit, containing the paths of the manifest files involved in the commit and their partition range information.
  • Data storage layer: By default, the columnar file format such as ORC or Parquet is used.