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

  1. Give each tables_configs entry a distinct schema.table name.
  2. Remove the duplicated entry if it is an accidental copy.
  3. 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

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


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)