apache/seatunnel · warning

No split key found for table

Error message

No split key found for table {}

What it means

ChunkSplitter.findSplitKey() looks for a suitable primary/split column for parallel chunking. When none qualifies (no primary key or no supported type), it logs this WARN and returns Optional.empty(), so the source will use non-parallel (single-chunk) reading.

Solutions

  1. Set the split_key option to a supported indexed column (numeric, date, or hash-safe string)
  2. Add a primary key or an auto-increment column to the table
  3. Accept single-parallelism reading if throughput is acceptable

Example fix

// before
Jdbc {
  url = "jdbc:..."
  table_path = "db.log_events" // no PK
// after
Jdbc {
  url = "jdbc:..."
  table_path = "db.log_events"
  split_key = "event_time"
Defensive patterns

Strategy: validation

Validate before calling

// ensure a supported split key exists before parallel read
boolean hasPk = table.getTableSchema().getPrimaryKey().stream()
    .anyMatch(col -> SUPPORTED_SPLIT_TYPES.contains(typeOf(table, col)));
if (!hasPk) config.set("split_key", chooseIndexedColumn(table));

Prevention

When it happens

Trigger: Source table has no primary key, the primary key columns are all of unsupported types, or split_key is not configured and none can be inferred.

Common situations: Reading from views or log tables without PKs; tables with composite string PKs where no single supported column exists; dialect-specific type restrictions (e.g. unsupported LOB/BLOB keys).

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/7fe9cdfdbeb28d64. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/source/ChunkSplitter.java:396

                            .collect(Collectors.toList());
            if (!uniqueKeys.isEmpty()) {
                for (ConstraintKey uniqueKey : uniqueKeys) {
                    for (ConstraintKey.ConstraintKeyColumn uniqueKeyColumn :
                            uniqueKey.getColumnNames()) {
                        String uniqueKeyColumnName = uniqueKeyColumn.getColumnName();
                        Column column = columnMap.get(uniqueKeyColumnName);
                        if (isSupportSplitColumn(column)) {
                            return Optional.of(
                                    new SeaTunnelRowType(
                                            new String[] {uniqueKeyColumnName},
                                            new SeaTunnelDataType[] {column.getDataType()}));
                        }
                    }
                }
            }
        }

        log.warn("No split key found for table {}", table.getTablePath());
        return Optional.empty();
    }

    protected boolean isSupportSplitColumn(Column splitColumn) {
        SeaTunnelDataType<?> dataType = splitColumn.getDataType();
        // currently, we only support these types.
        switch (dataType.getSqlType()) {
            case TINYINT:
            case SMALLINT:
            case INT:
            case BIGINT:
            case DOUBLE:
            case FLOAT:
            case DECIMAL:
            case STRING:
            case DATE:
                return true;
            default:

View on GitHub (pinned to cf67b549a7)