apache/seatunnel · error · IllegalArgumentException
Please configure unique `table_name`, not allow null/duplica
Error message
Please configure unique `table_name`, not allow null/duplicate table name: ${tableNameSet} What it means
HudiTableConfig.of() validates that the list of table configurations has unique, non-null table_name values when multiple tables are configured. This check fires when the number of distinct names collected from the configured tables is fewer than expected for the list size, meaning duplicates (or nulls) were supplied. Hudi sink routing requires a unique table_name per entry to map data to the correct table.
Source
Thrown at seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/config/HudiTableConfig.java:154
.batchIntervalMs(connectorConfig.get(BATCH_INTERVAL_MS))
.batchSize(connectorConfig.get(BATCH_SIZE))
.insertShuffleParallelism(
connectorConfig.get(INSERT_SHUFFLE_PARALLELISM))
.upsertShuffleParallelism(
connectorConfig.get(UPSERT_SHUFFLE_PARALLELISM))
.minCommitsToKeep(connectorConfig.get(MIN_COMMITS_TO_KEEP))
.maxCommitsToKeep(connectorConfig.get(MAX_COMMITS_TO_KEEP))
.cdcEnabled(connectorConfig.get(CDC_ENABLED))
.build();
tableList = Collections.singletonList(hudiTableConfig);
}
if (tableList.size() > 1) {
Set<String> tableNameSet =
tableList.stream()
.map(HudiTableConfig::getTableName)
.collect(Collectors.toSet());
if (tableNameSet.size() < tableList.size() - 1) {
throw new IllegalArgumentException(
"Please configure unique `table_name`, not allow null/duplicate table name: "
+ tableNameSet);
}
}
for (HudiTableConfig hudiTableConfig : tableList) {
if (Objects.isNull(hudiTableConfig.getTableName())) {
throw new IllegalArgumentException(
"Please configure `table_name`, not allow null table name in config.");
}
if (Objects.isNull(hudiTableConfig.getDatabase())) {
log.info(
"The hudi table '{}' not set database, will uses 'default' as its database.",
hudiTableConfig.getTableName());
hudiTableConfig.setDatabase(DATABASE.defaultValue());
}
if (Objects.isNull(hudiTableConfig.getTableType())) {
log.info(
"The hudi table '{}' not set table type, default uses 'COPY_ON_WRITE'.",View on GitHub (pinned to cf67b549a7)
Solutions
- Inspect the set printed in the message and give each entry in the table list a unique `table_name`.
- Remove duplicated table config blocks from the sink configuration.
- If two entries legitimately target the same table, merge them into one entry instead of duplicating table_name.
Example fix
// before
table_list = [
{table_name = "orders", ...},
{table_name = "orders", ...}
]
// after
table_list = [
{table_name = "orders", ...},
{table_name = "orders_shard2", ...}
] Defensive patterns
Strategy: validation
Validate before calling
List<String> names = tableList.stream()
.map(HudiTableConfig::getTableName)
.collect(Collectors.toList());
if (new HashSet<>(names).size() != names.size()) {
throw new IllegalArgumentException("duplicate table_name: " + names);
} Prevention
- Keep a unique table_name per entry in table_list.
- Avoid blind copy-paste of table config blocks.
- Lint generated configs for duplicate keys before submission.
When it happens
Trigger: Configuring a Hudi sink with multiple table entries whose `table_name` values collapse into fewer distinct names than entries minus one (duplicate table_name entries in the `table_list`).
Common situations: Copy-paste of a table config block without changing `table_name`; generated configs emitting the same table twice; typos that make two entries identical.
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
- Please configure `table_name`, not allow null table name in
- Schema config can not be empty
- Unknown format type:
- Option '${option}' cannot be blank
- Option '${valuesAndOptions[index + 1]}' is not valid for the
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/63a563f62686b867.
Report an issue: GitHub.