{"record":{"id":"4bfa68a9c4546782","repo":"apache/seatunnel","slug":"file-read-strategy-not-support","errorCode":"FILE_READ_STRATEGY_NOT_SUPPORT","errorMessage":"Cannot found the read strategy for this table: [%s]","messagePattern":"Cannot found the read strategy for this table: \\[(.+?)\\]","errorType":"error_code","errorClass":"FileConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/MultipleTableFileSourceReader.java","lineNumber":89,"sourceCode":"                                        BaseFileSourceConfig::getReadStrategy));\n        this.markdownKnowledgeSyncMetadataTableIds =\n                fileSourceConfigs.stream()\n                        .filter(\n                                MultipleTableFileSourceReader\n                                        ::isMarkdownKnowledgeSyncMetadataEnabled)\n                        .map(MultipleTableFileSourceReader::tableId)\n                        .collect(Collectors.toSet());\n    }\n\n    @Override\n    public void pollNext(Collector<SeaTunnelRow> output) {\n        FileSourceSplit split;\n        synchronized (output.getCheckpointLock()) {\n            split = sourceSplits.poll();\n            if (split != null) {\n                ReadStrategy readStrategy = readStrategyMap.get(split.getTableId());\n                if (readStrategy == null) {\n                    throw new FileConnectorException(\n                            FILE_READ_STRATEGY_NOT_SUPPORT,\n                            \"Cannot found the read strategy for this table: [\"\n                                    + split.getTableId()\n                                    + \"]\");\n                }\n                try {\n                    readStrategy.read(split, output);\n                } catch (Exception e) {\n                    boolean markdownKnowledgeSyncMetadataEnabled =\n                            markdownKnowledgeSyncMetadataTableIds.contains(split.getTableId());\n                    String sourceContext = split.splitId();\n                    Throwable cause = e;\n                    if (markdownKnowledgeSyncMetadataEnabled) {\n                        sourceContext =\n                                MarkdownKnowledgeSyncMetadata.safeSourceContext(\n                                        split.getFilePath());\n                        cause = MarkdownKnowledgeSyncMetadata.copyStackTraceOnly(e);\n                    }","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/MultipleTableFileSourceReader.java#L71-L107","documentation":"MultipleTableFileSourceReader polls splits that belong to multiple tables, and each split's tableId must map to a registered ReadStrategy. When no strategy was registered for a split's tableId, the reader cannot process it and throws FILE_READ_STRATEGY_NOT_SUPPORT. This indicates the split enumeration produced splits for a table this reader never prepared a strategy for.","triggerScenarios":"pollNext() dequeues a FileSourceSplit whose getTableId() is absent from readStrategyMap; multiple-table source where one table's file type has no matching read strategy registered during initialization.","commonSituations":"A multi-table directory scan where some tables use file types not covered by the configured strategies (e.g. unsupported format in one table); tableId mismatch after a version change in split metadata; config enumerating tables with a file type not enabled for this reader.","solutions":["Check the table paths and ensure every table's file type is a supported format (text/json/csv/orc/parquet).","Review tableId registration logic in the split enumerator/reader init and ensure a strategy is created for each enumerated table.","Exclude or move the unsupported table's files out of the source path.","If split metadata comes from an old checkpoint/savepoint, restart the job without state so splits are re-enumerated."],"exampleFix":"// before: table 't3' uses avro, no strategy registered\n// after: reconfigure source to only include supported tables, or add support\nReadStrategy readStrategy = readStrategyMap.computeIfAbsent(\n    split.getTableId(), id -> ReadStrategyFactory.of(split.getFilePath()));","handlingStrategy":"validation","validationCode":"// before reading, assert every tableId in splits has a strategy\nsplits.forEach(s -> { if (!readStrategyMap.containsKey(s.getTableId())) throw new IllegalArgumentException(\"No strategy for table \" + s.getTableId()); });","typeGuard":null,"tryCatchPattern":"try { reader.pollNext(); } catch (FileConnectorException e) { if (e.getMessage().contains(\"Cannot found the read strategy\")) { log.error(\"Unregistered tableId: {}\", extractTableId(e.getMessage())); } throw e; }","preventionTips":["Ensure every table in the source path uses a supported file format","Keep split enumeration and strategy registration logic in sync","Discard old checkpoints when table/file-type configuration changes","Log registered tableIds at startup and compare with enumerated splits"],"tags":["file-source","multi-table","read-strategy","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}