{"record":{"id":"786c3cc9879266a1","repo":"apache/seatunnel","slug":"seatunnelapierrorcode-config-validation-failed-786c3c","errorCode":"SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED","errorMessage":"tables_configs cannot be empty","messagePattern":"tables_configs cannot be empty","errorType":"error_code","errorClass":"PulsarConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/config/PulsarMultiTableConfig.java","lineNumber":132,"sourceCode":"                        topic,\n                        topicPattern != null ? Pattern.compile(topicPattern) : null,\n                        format,\n                        startMode,\n                        startTimestamp,\n                        stopMode,\n                        stopTimestamp,\n                        resetMode,\n                        subscriptionName,\n                        config);\n\n        return new PulsarMultiTableConfig(\n                java.util.Collections.singletonList(tableConfig), config, false, false);\n    }\n\n    private static PulsarMultiTableConfig parseMultiTable(ReadonlyConfig config) {\n        List<Map<String, Object>> tablesConfigs = config.get(TableSchemaOptions.TABLE_CONFIGS);\n        if (tablesConfigs.isEmpty()) {\n            throw new PulsarConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    \"tables_configs cannot be empty\");\n        }\n        List<PulsarTableConfig> tableConfigs = new ArrayList<>();\n        Map<String, Integer> tablePathIndexes = new LinkedHashMap<>();\n        Map<String, Integer> explicitTopicIndexes = new LinkedHashMap<>();\n        Map<String, Integer> topicPatternIndexes = new LinkedHashMap<>();\n        List<PatternEntry> knownPatterns = new ArrayList<>();\n\n        for (int i = 0; i < tablesConfigs.size(); i++) {\n            Map<String, Object> tableConfigMap = tablesConfigs.get(i);\n            ReadonlyConfig tableConfig = mergeWithGlobal(config, tableConfigMap);\n\n            String topic = tableConfig.getOptional(PulsarSourceOptions.TOPIC).orElse(null);\n            String topicPatternStr =\n                    tableConfig.getOptional(PulsarSourceOptions.TOPIC_PATTERN).orElse(null);\n\n            if ((topic == null && topicPatternStr == null)","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/config/PulsarMultiTableConfig.java#L114-L150","documentation":"PulsarMultiTableConfig.parseMultiTable validates the 'tables_configs' list; an empty list provides no tables to read, so it throws PulsarConnectorException with SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED. At least one table entry is required for multi-table Pulsar sources.","triggerScenarios":"PulsarSource config parsed via PulsarMultiTableConfig.of where tables_configs key is present but resolves to an empty list ([]).","commonSituations":"User defines tables_configs = [] (or the list is produced empty by templating/env substitution) instead of configuring table entries; copy-pasting a skeleton config without filling it in.","solutions":["Populate tables_configs with at least one entry containing topic/topic-pattern, subscription.name, and schema.","If you intend a single-table read, use the single-table config style (topic at top level) instead of empty tables_configs.","Check templating/variable substitution isn't producing an empty list at runtime."],"exampleFix":"// before\ntables_configs = []\n// after\ntables_configs = [\n  {\n    topic = \"persistent://public/default/orders\"\n    \"subscription.name\" = \"seatunnel-sub\"\n  }\n]","handlingStrategy":"validation","validationCode":"List<Map<String,Object>> tables = config.get(TableSchemaOptions.TABLE_CONFIGS);\nif (tables == null || tables.isEmpty()) throw new IllegalArgumentException(\"tables_configs must contain at least one entry\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate HOCON config locally before job submission","Check templating/variable output isn't producing an empty list","Prefer single-table syntax when only one topic is needed","Keep a checked-in example config with a populated tables_configs"],"tags":["pulsar","config-validation","multi-table"],"backgroundTag":"empty-required-field","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"}