Skip to main content

Runtime Configuration

Use SQL hints for options that apply to one statement, session settings for a job or session, and ALTER TABLE ... SET for persisted table options. See FlinkConnectorOptions for the full option reference.

Checkpointing​

Streaming writes need checkpointing to commit data. Configure it before submitting the write job:

SET 'execution.runtime-mode' = 'streaming';
SET 'execution.checkpointing.interval' = '10 s';

A query reads committed snapshots. If newly written records are not visible, check that the writer has completed a checkpoint. Changing a SQL client setting affects subsequently submitted jobs; it does not reconfigure an already running job.

By default, each sink task manages its own heap memory for writer buffers. Enable managed memory to let Flink allocate a share of the slot's managed memory to the Paimon writer.

OptionDefaultMeaning
sink.use-managed-memory-allocatorfalseUse Flink managed memory for the writer's merge tree buffers.
sink.managed.writer-buffer-memory256 MiBWeight used by Flink to allocate managed memory to the writer. The actual allocation depends on the slot's managed memory and the operators sharing it.

The writer-buffer setting is a weight, not a fixed allocation of that many bytes.

INSERT INTO paimon_table /*+ OPTIONS(
'sink.use-managed-memory-allocator' = 'true',
'sink.managed.writer-buffer-memory' = '256 mb'
) */
SELECT * FROM source_table;

Setting dynamic options​

Dynamic options tune a query or a subsequently submitted job without changing the options stored in the catalog.

ScopeSyntaxEffect
One statement/*+ OPTIONS('key' = 'value') */ on the tableApplies to that table reference.
Session, all tablesSET 'key' = 'value'Supplies a global dynamic option.
Session, selected tablesSET 'paimon.catalog.database.table.key' = 'value'Overrides the corresponding global dynamic option for matching tables.

In a table-scoped key, the catalog, database, or table component can be *. Avoid setting conflicting values in overlapping table patterns. Reset session options after using them so they do not affect later queries.

-- Global default for queries in this session.
SET 'scan.timestamp-millis' = '1697018249001';

-- Override it for one table.
SET 'paimon.mycatalog.default.T.scan.timestamp-millis' = '1697018249000';
SELECT * FROM mycatalog.default.T;

RESET 'paimon.mycatalog.default.T.scan.timestamp-millis';
RESET 'scan.timestamp-millis';

-- Match default.T in any catalog.
SET 'paimon.*.default.T.scan.timestamp-millis' = '1697018249000';
SELECT * FROM mycatalog.default.T;
RESET 'paimon.*.default.T.scan.timestamp-millis';

For symptom-based checks, start with Troubleshooting.

ConcernGuide
Source parallelism and split planningSQL Query
Writer buffers, parallelism, and compactionWrite Performance
Missing lookup matches or a large dimension tableLookup Joins
Progress retention and restarting readersConsumer ID
Upgrading or restoring a writerSavepoint