apache/seatunnel · error · JobDefineCheckException
Transform/Sink don't support processing data with two…
Error message
Transform/Sink don't support processing data with two different structures.
What it means
checkProducedTypeEquals validates that all input actions feeding one transform or sink produce identical SeaTunnelDataTypes. A transform/sink merges multiple upstream inputs only when their row schemas match; two different structures cannot be combined, so parsing fails with this JobDefineCheckException.
Solutions
- Ensure all inputs share the same schema, or split the sink into one sink per structure.
- Insert a transform (e.g. Sql/FieldMapper/Replace) to normalize each branch to a common schema before merging.
- Restrict a multi-table source with table_names/table_path regex so only same-structure tables feed the sink.
- Verify upstream table schemas haven't drifted; refresh cached catalogs if needed.
Example fix
// before: one sink fed by multi-table source with differing schemas
source { Jdbc { table_path = "db.*" } }
sink { Console {} }
// after: group by compatible table sets
source { Jdbc { table_path = "db.orders_.*" } }
sink { Console {} } Defensive patterns
Strategy: validation
Validate before calling
// ensure all inputs to a sink share one schema
CatalogTable first = inputs.get(0).getCatalogTable();
for (Action a : inputs) {
if (!first.getTableSchema().equals(getProducedType(a).getTableSchema())) {
throw new IllegalArgumentException("Divergent input schemas feeding one sink");
}
} Try / catch
try {
engine.submitJob(config);
} catch (JobDefineCheckException e) {
if (e.getMessage().contains("two different structures")) {
// split sinks or add normalizing transforms
}
} Prevention
- Match multi-table source patterns to same-schema tables only
- Insert FieldMapper/Sql transforms to normalize branches before merging
- Watch upstream DDL changes that alter produced schemas
When it happens
Trigger: parseTransform or parseSink receives a Set of input actions (multi-table source or multiple upstream branches) whose produced CatalogTable types differ (different columns or types), detected during DAG construction.
Common situations: Connecting a multi-table source (table_path matching several tables with different schemas) directly to one sink; merging two branches of different schemas into one transform; upstream schema drift after a table was altered.
Related errors
- Sink don't support simultaneous writing of data from…
- All candidate sink tables were skipped during job parsing.
- Can't find column in table.
- COMMON-02
- COMMON-02
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/bec6a863b2cd6f1f.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-engine/seatunnel-engine-core/src/main/java/org/apache/seatunnel/engine/core/parse/MultipleTableJobConfigParser.java:605
} catch (UnsupportedOperationException e) {
// TODO remove it when all connector use `getProducedCatalogTables`
return ((SourceAction<?, ?, ?>) action).getSource().getProducedType();
}
} else if (action instanceof TransformAction) {
return ((TransformAction) action)
.getTransform()
.getProducedCatalogTable()
.getSeaTunnelRowType();
}
throw new UnsupportedOperationException();
}
public static void checkProducedTypeEquals(Set<Action> inputActions) {
SeaTunnelDataType<?> expectedType = getProducedType(new ArrayList<>(inputActions).get(0));
for (Action action : inputActions) {
SeaTunnelDataType<?> producedType = getProducedType(action);
if (!expectedType.equals(producedType)) {
throw new JobDefineCheckException(
"Transform/Sink don't support processing data with two different structures.");
}
}
}
@Deprecated
private static <T> T findLast(LinkedHashMap<?, T> map) {
int size = map.size();
int i = 1;
for (T value : map.values()) {
if (i == size) {
return value;
}
i++;
}
// never execution
return null;
}View on GitHub (pinned to cf67b549a7)