apache/seatunnel · error · SeaTunnelRuntimeException
CATALOG_TABLE_SIZE_IS_ERROR
CATALOG_TABLE_SIZE_IS_ERROR
Error message
The catalogTableFromConfigs size is not correct
What it means
BaseMultipleTableFileSourceConfig.parseFromFileSourceConfigs builds per-table file source configs from table_configs and the pre-parsed catalog tables. It requires catalogTableFromConfigs.size() to exactly match the number of entries under ConnectorCommonOptions.TABLE_CONFIGS ('table_configs'); otherwise it throws SeaTunnelRuntimeException with CATALOG_TABLE_SIZE_IS_ERROR.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/BaseMultipleTableFileSourceConfig.java:56
private static final long serialVersionUID = 1L;
@Getter private List<BaseFileSourceConfig> fileSourceConfigs;
public BaseMultipleTableFileSourceConfig(
ReadonlyConfig fileSourceRootConfig, List<CatalogTable> catalogTablesFromConfig) {
if (fileSourceRootConfig.getOptional(ConnectorCommonOptions.TABLE_CONFIGS).isPresent()) {
parseFromFileSourceConfigs(fileSourceRootConfig, catalogTablesFromConfig);
} else {
parseFromFileSourceConfig(fileSourceRootConfig, catalogTablesFromConfig.get(0));
}
}
private void parseFromFileSourceConfigs(
ReadonlyConfig fileSourceRootConfig, List<CatalogTable> catalogTableFromConfigs) {
final List<Map<String, Object>> maps =
fileSourceRootConfig.get(ConnectorCommonOptions.TABLE_CONFIGS);
if (catalogTableFromConfigs.size() != maps.size()) {
throw new SeaTunnelRuntimeException(
CATALOG_TABLE_SIZE_IS_ERROR, "The catalogTableFromConfigs size is not correct");
}
this.fileSourceConfigs = new ArrayList<>();
for (int i = 0; i < catalogTableFromConfigs.size(); i++) {
fileSourceConfigs.add(
this.getBaseSourceConfig(
ReadonlyConfig.fromMap(maps.get(i)), catalogTableFromConfigs.get(i)));
}
}
public abstract BaseFileSourceConfig getBaseSourceConfig(
ReadonlyConfig readonlyConfig, CatalogTable catalogTableFromConfig);
private void parseFromFileSourceConfig(
ReadonlyConfig fileSourceRootConfig, CatalogTable catalogTableFromConfig) {
this.fileSourceConfigs =
Lists.newArrayList(
getBaseSourceConfig(fileSourceRootConfig, catalogTableFromConfig));View on GitHub (pinned to cf67b549a7)
Solutions
- Ensure every entry under table_configs produces exactly one CatalogTable — check that each table entry has a valid schema (schema.fields) and does not silently fail parsing.
- Align the catalogTableFromConfigs list passed to the constructor with the table_configs list (same order and count).
- Verify table_paths/table_paths_to_table_name mappings are consistent with table_configs entries.
- If triggered inside a supported connector path, report it as a bug with your full config and SeaTunnel version.
Example fix
// before (programmatic) new BaseMultipleTableFileSourceConfig(cfg, catalogTables.subList(0, 2)) // 3 in table_configs // after new BaseMultipleTableFileSourceConfig(cfg, catalogTables) // size matches table_configs
Defensive patterns
Strategy: validation
Validate before calling
List<Map<String,Object>> tableConfigs = rootConfig.get(ConnectorCommonOptions.TABLE_CONFIGS);
if (catalogTableFromConfigs.size() != tableConfigs.size()) {
throw new IllegalArgumentException("catalogTables (" + catalogTableFromConfigs.size()
+ ") must match table_configs (" + tableConfigs.size() + ")");
} Try / catch
try {
parseFromFileSourceConfigs(rootConfig, catalogTables);
} catch (SeaTunnelRuntimeException e) {
if (CATALOG_TABLE_SIZE_IS_ERROR.equals(e.getSeaTunnelErrorCode())) {
log.error("table_configs count != parsed CatalogTable count; check each table entry has a valid schema", e);
}
throw e;
} Prevention
- When building configs programmatically, derive catalogTables directly from table_configs instead of maintaining parallel lists.
- Validate every table_configs entry parses into a CatalogTable before constructing the multi-table config.
- Keep table_paths / table_paths_to_table_name consistent with table_configs order.
- Pin a single SeaTunnel version across build/test/prod to avoid parsing-behavior drift.
When it happens
Trigger: Using a multi-table file source where the number of resolved CatalogTables derived from table_configs differs from table_configs list size — typically due to an internal mismatch between parsed table metadata and the config list.
Common situations: Programmatically constructing BaseMultipleTableFileSourceConfig with a hand-built catalogTableFromConfigs list that doesn't match table_configs; framework/plugin version changes altering how catalog tables are collected; a bug when table_configs contains entries whose schemas fail to parse and are dropped upstream.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- Document routing requires whole-file splits, but got split $
- MultiTableWriterRunnable can't find writer for tableId:
- Can't find column in table.
- Elasticsearch multi-table writer requires ElasticsearchMulti
- FILE_LIST_GET_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/a87a3c85a052fbb2.
Report an issue: GitHub.