apache/seatunnel · error · IllegalArgumentException

Please configure unique `database`.`table`, not allow null/d

Error message

Please configure unique `database`.`table`, not allow null/duplicate: {tableIds}

What it means

DorisTableConfig.of validates that the list of table configurations yields unique, non-null `database`.`table` identifiers. Note the check compares tableIdSet.size() < tableList.size() - 1, an off-by-one-style guard intended to catch duplicates (and null ids collapsing in the set). When violated it throws IllegalArgumentException listing the tableIds.

Source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/config/DorisTableConfig.java:115

                            .table(connectorConfig.get(TABLE))
                            .database(connectorConfig.get(DATABASE))
                            .readField(connectorConfig.get(DORIS_READ_FIELD))
                            .filterQuery(connectorConfig.get(DORIS_FILTER_QUERY))
                            .batchSize(connectorConfig.get(DORIS_BATCH_SIZE))
                            .tabletSize(connectorConfig.get(DORIS_TABLET_SIZE))
                            .execMemLimit(connectorConfig.get(DORIS_EXEC_MEM_LIMIT))
                            .build();
            tableList = Collections.singletonList(tableProperty);
        }

        if (tableList.size() > 1) {
            List<String> tableIds =
                    tableList.stream()
                            .map(DorisTableConfig::getTableIdentifier)
                            .collect(Collectors.toList());
            Set<String> tableIdSet = new HashSet<>(tableIds);
            if (tableIdSet.size() < tableList.size() - 1) {
                throw new IllegalArgumentException(
                        "Please configure unique `database`.`table`, not allow null/duplicate: "
                                + tableIds);
            }
        }

        for (DorisTableConfig dorisTableConfig : tableList) {
            if (StringUtils.isBlank(dorisTableConfig.getDatabase())) {
                throw new IllegalArgumentException(
                        "Please configure `database`, not allow null database in config.");
            }
            if (StringUtils.isBlank(dorisTableConfig.getTable())) {
                throw new IllegalArgumentException(
                        "Please configure `table`, not allow null table in config.");
            }
            if (dorisTableConfig.getBatchSize() <= 0) {
                dorisTableConfig.setBatchSize(DORIS_BATCH_SIZE.defaultValue());
            }
            if (dorisTableConfig.getExecMemLimit() <= 0) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Remove duplicate `database`.`table` entries so every configured table is unique
  2. Merge per-table options (batch-size, exec-mem-limit) into a single entry for the duplicated table
  3. Log/print the table list in your config and verify uniqueness before submission

Example fix

// before
table-list = [{database = "db", table = "t"}, {database = "db", table = "t"}]
// after
table-list = [{database = "db", table = "t"}]
Defensive patterns

Strategy: validation

Validate before calling

List<String> ids = tableList.stream()
        .map(t -> t.getDatabase() + "." + t.getTable())
        .collect(Collectors.toList());
if (new HashSet<>(ids).size() != ids.size()) {
    throw new IllegalArgumentException("Duplicate database.table entries: " + ids);
}

Try / catch

try {
    DorisTableConfig.of(dorisConfig, options);
} catch (IllegalArgumentException e) {
    if (e.getMessage().startsWith("Please configure unique")) {
        LOG.error("De-duplicate table-list entries in config: {}", e.getMessage());
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling DorisTableConfig.of(...) where two configured tables resolve to the same `database`.`table` identifier (e.g. duplicate entries in table list, or same table configured with different options), or an identifier is null causing set collapse.

Common situations: Multi-table sink config with a repeated database.table entry; YAML/HOCON array duplication; merge of configs where the same table appears in multiple sources.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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