apache/seatunnel · error · OptionValidationException
tables_configs[ ]: duplicate 'schema.table' value
Error message
tables_configs[%d]: duplicate 'schema.table' value '%s'
What it means
tables_configs entries must each resolve to a unique table name. The factory collects trimmed schema.table values into a Set and throws OptionValidationException when a duplicate table name is encountered, because two entries writing/reading the same table would conflict.
Solutions
- Give each tables_configs entry a distinct schema.table name.
- Remove the duplicated entry if it is an accidental copy.
- If the same data is needed twice, use different table names and adjust downstream logic.
Example fix
// before
tables_configs = [
{ query = "...", schema = { table = "person", ... } }
{ query = "MATCH (n:Person) WHERE n.age > 30 RETURN ...", schema = { table = "person", ... } }
]
// after
tables_configs = [
{ query = "...", schema = { table = "person", ... } }
{ query = "MATCH (n:Person) WHERE n.age > 30 RETURN ...", schema = { table = "person_over_30", ... } }
] Defensive patterns
Strategy: validation
Validate before calling
def seen = [] as Set
tables_configs.eachWithIndex { entry, i ->
def t = entry.schema?.table?.trim()
if (!seen.add(t)) {
throw new IllegalArgumentException("duplicate schema.table '${t}' at tables_configs[${i}]")
}
} Prevention
- Keep table names unique across entries.
- When copy-pasting entries, immediately change the table name.
- Add a pre-submit uniqueness check in config generation tooling.
When it happens
Trigger: Two or more tables_configs entries whose trimmed schema.table values are identical (tableIds.add(tableId) returns false on the second occurrence).
Common situations: Copy-pasting an entry and forgetting to change the table name; running the same query twice with different column projections but the same table name; generated configs expanding a list with a constant table name.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- root-level 'schema' cannot be used with 'tables_configs'
- 'schema' must be configured when using a root-level 'query'
- table name: must be unique
- tables_configs[ ]: 'query' must be configured and non-blank
- tables_configs[ ]: 'schema' must be configured and non-empty
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/5529c8d6d0755988.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-neo4j/src/main/java/org/apache/seatunnel/connectors/seatunnel/neo4j/source/Neo4jSourceFactory.java:225
}
Object schemaValue = entry.get(ConnectorCommonOptions.SCHEMA.key());
if (!(schemaValue instanceof Map) || ((Map<?, ?>) schemaValue).isEmpty()) {
throw new OptionValidationException(
"tables_configs[%d]: 'schema' must be configured and non-empty", i);
}
Object tableValue =
((Map<?, ?>) schemaValue).get(ConnectorCommonOptions.TABLE.key());
if (!(tableValue instanceof String) || ((String) tableValue).trim().isEmpty()) {
throw new OptionValidationException(
"tables_configs[%d]: 'schema.table' must be configured and non-blank",
i);
}
String tableId = ((String) tableValue).trim();
if (!tableIds.add(tableId)) {
throw new OptionValidationException(
"tables_configs[%d]: duplicate 'schema.table' value '%s'", i, tableId);
}
}
return true;
}
}
}
View on GitHub (pinned to cf67b549a7)