apache/seatunnel · error · FileConnectorException

FILE_READ_STRATEGY_NOT_SUPPORT

FILE_READ_STRATEGY_NOT_SUPPORT

Error message

Cannot found the read strategy for this table: [%s]

What it means

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.

Source

Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/MultipleTableFileSourceReader.java:89

                                        BaseFileSourceConfig::getReadStrategy));
        this.markdownKnowledgeSyncMetadataTableIds =
                fileSourceConfigs.stream()
                        .filter(
                                MultipleTableFileSourceReader
                                        ::isMarkdownKnowledgeSyncMetadataEnabled)
                        .map(MultipleTableFileSourceReader::tableId)
                        .collect(Collectors.toSet());
    }

    @Override
    public void pollNext(Collector<SeaTunnelRow> output) {
        FileSourceSplit split;
        synchronized (output.getCheckpointLock()) {
            split = sourceSplits.poll();
            if (split != null) {
                ReadStrategy readStrategy = readStrategyMap.get(split.getTableId());
                if (readStrategy == null) {
                    throw new FileConnectorException(
                            FILE_READ_STRATEGY_NOT_SUPPORT,
                            "Cannot found the read strategy for this table: ["
                                    + split.getTableId()
                                    + "]");
                }
                try {
                    readStrategy.read(split, output);
                } catch (Exception e) {
                    boolean markdownKnowledgeSyncMetadataEnabled =
                            markdownKnowledgeSyncMetadataTableIds.contains(split.getTableId());
                    String sourceContext = split.splitId();
                    Throwable cause = e;
                    if (markdownKnowledgeSyncMetadataEnabled) {
                        sourceContext =
                                MarkdownKnowledgeSyncMetadata.safeSourceContext(
                                        split.getFilePath());
                        cause = MarkdownKnowledgeSyncMetadata.copyStackTraceOnly(e);
                    }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check the table paths and ensure every table's file type is a supported format (text/json/csv/orc/parquet).
  2. Review tableId registration logic in the split enumerator/reader init and ensure a strategy is created for each enumerated table.
  3. Exclude or move the unsupported table's files out of the source path.
  4. If split metadata comes from an old checkpoint/savepoint, restart the job without state so splits are re-enumerated.

Example fix

// before: table 't3' uses avro, no strategy registered
// after: reconfigure source to only include supported tables, or add support
ReadStrategy readStrategy = readStrategyMap.computeIfAbsent(
    split.getTableId(), id -> ReadStrategyFactory.of(split.getFilePath()));
Defensive patterns

Strategy: validation

Validate before calling

// before reading, assert every tableId in splits has a strategy
splits.forEach(s -> { if (!readStrategyMap.containsKey(s.getTableId())) throw new IllegalArgumentException("No strategy for table " + s.getTableId()); });

Try / catch

try { reader.pollNext(); } catch (FileConnectorException e) { if (e.getMessage().contains("Cannot found the read strategy")) { log.error("Unregistered tableId: {}", extractTableId(e.getMessage())); } throw e; }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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