{"record":{"id":"7fe9cdfdbeb28d64","repo":"apache/seatunnel","slug":"no-split-key-found-for-table","errorCode":null,"errorMessage":"No split key found for table {}","messagePattern":"No split key found for table (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/source/ChunkSplitter.java","lineNumber":396,"sourceCode":"                            .collect(Collectors.toList());\n            if (!uniqueKeys.isEmpty()) {\n                for (ConstraintKey uniqueKey : uniqueKeys) {\n                    for (ConstraintKey.ConstraintKeyColumn uniqueKeyColumn :\n                            uniqueKey.getColumnNames()) {\n                        String uniqueKeyColumnName = uniqueKeyColumn.getColumnName();\n                        Column column = columnMap.get(uniqueKeyColumnName);\n                        if (isSupportSplitColumn(column)) {\n                            return Optional.of(\n                                    new SeaTunnelRowType(\n                                            new String[] {uniqueKeyColumnName},\n                                            new SeaTunnelDataType[] {column.getDataType()}));\n                        }\n                    }\n                }\n            }\n        }\n\n        log.warn(\"No split key found for table {}\", table.getTablePath());\n        return Optional.empty();\n    }\n\n    protected boolean isSupportSplitColumn(Column splitColumn) {\n        SeaTunnelDataType<?> dataType = splitColumn.getDataType();\n        // currently, we only support these types.\n        switch (dataType.getSqlType()) {\n            case TINYINT:\n            case SMALLINT:\n            case INT:\n            case BIGINT:\n            case DOUBLE:\n            case FLOAT:\n            case DECIMAL:\n            case STRING:\n            case DATE:\n                return true;\n            default:","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/source/ChunkSplitter.java#L378-L414","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Set the split_key option to a supported indexed column (numeric, date, or hash-safe string)","Add a primary key or an auto-increment column to the table","Accept single-parallelism reading if throughput is acceptable"],"exampleFix":"// before\nJdbc {\n  url = \"jdbc:...\"\n  table_path = \"db.log_events\" // no PK\n// after\nJdbc {\n  url = \"jdbc:...\"\n  table_path = \"db.log_events\"\n  split_key = \"event_time\"","handlingStrategy":"validation","validationCode":"// ensure a supported split key exists before parallel read\nboolean hasPk = table.getTableSchema().getPrimaryKey().stream()\n    .anyMatch(col -> SUPPORTED_SPLIT_TYPES.contains(typeOf(table, col)));\nif (!hasPk) config.set(\"split_key\", chooseIndexedColumn(table));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure split_key explicitly when tables lack PKs","Index the chosen split column","Check supported data types for split columns before scaling parallelism"],"tags":["jdbc","split","parallelism"],"backgroundTag":"record-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}