{"record":{"id":"af37ca49933aeefd","repo":"apache/seatunnel","slug":"db2-cdc-table-names-must-use-database-schema-table","errorCode":null,"errorMessage":"DB2 CDC table-names must use database.schema.table format, but found: ${configuredTable}","messagePattern":"DB2 CDC table-names must use database\\.schema\\.table format, but found: (.+?)","errorType":"validation","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-db2/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/db2/utils/TableDiscoveryUtils.java","lineNumber":95,"sourceCode":"            }\n        }\n        if (!missingTables.isEmpty()) {\n            throw new SeaTunnelException(\n                    \"The following configured DB2 tables are not enabled for capture: \"\n                            + String.join(\", \", missingTables));\n        }\n    }\n\n    /**\n     * Db2 Debezium metadata always uses an empty catalog because one connector instance captures a\n     * single configured database. Explicit SeaTunnel table names still carry the database segment,\n     * so startup validation needs to drop that catalog part before comparing with capture tables.\n     */\n    static TableId toConfiguredDb2TableId(String configuredTable) {\n        int firstDot = configuredTable.indexOf('.');\n        int secondDot = configuredTable.indexOf('.', firstDot + 1);\n        if (firstDot < 0 || secondDot < 0 || secondDot == configuredTable.length() - 1) {\n            throw new SeaTunnelException(\n                    \"DB2 CDC table-names must use database.schema.table format, but found: \"\n                            + configuredTable);\n        }\n        return new TableId(\n                \"\",\n                configuredTable.substring(firstDot + 1, secondDot),\n                configuredTable.substring(secondDot + 1));\n    }\n\n    /**\n     * Debezium change-table discovery emits empty-catalog {@link TableId}s for Db2, so startup\n     * validation normalizes both sides to the same shape before comparing them.\n     */\n    static TableId normalizeCapturedTableId(TableId tableId) {\n        return new TableId(\"\", tableId.schema(), tableId.table());\n    }\n}\n","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-db2/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/db2/utils/TableDiscoveryUtils.java#L77-L113","documentation":"TableDiscoveryUtils.toConfiguredDb2TableId parses each configured table-name expecting database.schema.table. If a name lacks both dots, or the string ends right after the second dot (empty table part), it throws SeaTunnelException rejecting the malformed name before capture validation can proceed.","triggerScenarios":"Configuring table-names with only schema.table (two parts) or a bare table name, or a trailing dot like 'db.schema.' — any value that doesn't split into three non-empty parts.","commonSituations":"Users copy Kafka-style schema.table patterns from other CDC connectors; missing schema or database qualifier; typo/trailing dot in YAML list.","solutions":["Change the configured value to full three-part form database.schema.table","Ensure no trailing dot and all three segments are non-empty","Uppercase segments to match DB2 metadata if needed"],"exampleFix":"// before\ntable-names = [\"MYSCHEMA.MYTABLE\"]\n// after\ntable-names = [\"MYDB.MYSCHEMA.MYTABLE\"]","handlingStrategy":"validation","validationCode":"// Validate table-names format before submitting the job\nfor (String t : tableNames) { String[] p = t.split(\"\\\\.\"); if (p.length != 3 || p[0].isEmpty() || p[1].isEmpty() || p[2].isEmpty()) throw new IllegalArgumentException(\"table-names must be database.schema.table: \" + t); }","typeGuard":null,"tryCatchPattern":"try { sourceFactory.createSource(...); } catch (SeaTunnelException e) { if (e.getMessage().contains(\"must use database.schema.table format\")) { /* fix the offending entry named in the message */ } throw e; }","preventionTips":["Always use three-part database.schema.table names in table-names","No trailing dots or empty segments","Diff config against a working example for the DB2 CDC connector"],"tags":["db2","cdc","config","identifier-format"],"backgroundTag":"invalid-identifier-format","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"}