{"record":{"id":"63a563f62686b867","repo":"apache/seatunnel","slug":"please-configure-unique-table-name-not-allow-nu","errorCode":null,"errorMessage":"Please configure unique `table_name`, not allow null/duplicate table name: ${tableNameSet}","messagePattern":"Please configure unique `table_name`, not allow null/duplicate table name: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/config/HudiTableConfig.java","lineNumber":154,"sourceCode":"                            .batchIntervalMs(connectorConfig.get(BATCH_INTERVAL_MS))\n                            .batchSize(connectorConfig.get(BATCH_SIZE))\n                            .insertShuffleParallelism(\n                                    connectorConfig.get(INSERT_SHUFFLE_PARALLELISM))\n                            .upsertShuffleParallelism(\n                                    connectorConfig.get(UPSERT_SHUFFLE_PARALLELISM))\n                            .minCommitsToKeep(connectorConfig.get(MIN_COMMITS_TO_KEEP))\n                            .maxCommitsToKeep(connectorConfig.get(MAX_COMMITS_TO_KEEP))\n                            .cdcEnabled(connectorConfig.get(CDC_ENABLED))\n                            .build();\n            tableList = Collections.singletonList(hudiTableConfig);\n        }\n        if (tableList.size() > 1) {\n            Set<String> tableNameSet =\n                    tableList.stream()\n                            .map(HudiTableConfig::getTableName)\n                            .collect(Collectors.toSet());\n            if (tableNameSet.size() < tableList.size() - 1) {\n                throw new IllegalArgumentException(\n                        \"Please configure unique `table_name`, not allow null/duplicate table name: \"\n                                + tableNameSet);\n            }\n        }\n        for (HudiTableConfig hudiTableConfig : tableList) {\n            if (Objects.isNull(hudiTableConfig.getTableName())) {\n                throw new IllegalArgumentException(\n                        \"Please configure `table_name`, not allow null table name in config.\");\n            }\n            if (Objects.isNull(hudiTableConfig.getDatabase())) {\n                log.info(\n                        \"The hudi table '{}' not set database, will uses 'default' as its database.\",\n                        hudiTableConfig.getTableName());\n                hudiTableConfig.setDatabase(DATABASE.defaultValue());\n            }\n            if (Objects.isNull(hudiTableConfig.getTableType())) {\n                log.info(\n                        \"The hudi table '{}' not set table type, default uses 'COPY_ON_WRITE'.\",","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/config/HudiTableConfig.java#L136-L172","documentation":"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.","triggerScenarios":"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`).","commonSituations":"Copy-paste of a table config block without changing `table_name`; generated configs emitting the same table twice; typos that make two entries identical.","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."],"exampleFix":"// before\ntable_list = [\n  {table_name = \"orders\", ...},\n  {table_name = \"orders\", ...}\n]\n\n// after\ntable_list = [\n  {table_name = \"orders\", ...},\n  {table_name = \"orders_shard2\", ...}\n]","handlingStrategy":"validation","validationCode":"List<String> names = tableList.stream()\n    .map(HudiTableConfig::getTableName)\n    .collect(Collectors.toList());\nif (new HashSet<>(names).size() != names.size()) {\n    throw new IllegalArgumentException(\"duplicate table_name: \" + names);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["hudi","config","duplicate-table-name","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}