{"record":{"id":"575ebaa5de6a10f7","repo":"apache/seatunnel","slug":"can-t-obtain-schema-for-table-s","errorCode":null,"errorMessage":"Can't obtain schema for table %s ","messagePattern":"Can't obtain schema for table (.+?) ","errorType":"exception","errorClass":"org.apache.seatunnel.api.table.type.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/Db2Schema.java","lineNumber":87,"sourceCode":"                    false);\n            for (TableId id : tables.tableIds()) {\n                if (tableMap.containsKey(id)) {\n                    Table table =\n                            CatalogTableUtils.mergeCatalogTableConfig(\n                                    tables.forTable(id), tableMap.get(id));\n                    TableChanges.TableChange tableChange =\n                            new TableChanges.TableChange(\n                                    TableChanges.TableChangeType.CREATE, table);\n                    schemasByTableId.put(id, tableChange);\n                }\n            }\n        } catch (SQLException e) {\n            throw new SeaTunnelException(\n                    String.format(\"Failed to read schema for table %s \", tableId), e);\n        }\n\n        if (!schemasByTableId.containsKey(tableId)) {\n            throw new SeaTunnelException(\n                    String.format(\"Can't obtain schema for table %s \", tableId));\n        }\n\n        return schemasByTableId.get(tableId);\n    }\n}\n","sourceCodeStart":69,"sourceCodeEnd":94,"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/Db2Schema.java#L69-L94","documentation":"Db2Schema.readTableSchema throws this when no schema entry could be produced for the requested table — after building the Debezium Db2DatabaseSchema, the table was absent or filtered out, so no TableChange exists for it.","triggerScenarios":"The metadata query returned rows but none matched the requested table id — e.g. identifier case/quoting mismatch, table dropped between query planning and schema read, or querying a table in a database/schema the connection does not target.","commonSituations":"Table name casing mismatch (DB2 stores uppercase identifiers); wrong database in JDBC URL; table renamed concurrently; filtering out the table in config while it is still referenced by a split.","solutions":["Verify the exact schema and table names as stored in DB2 (usually uppercase) and fix the table list in the source config","Confirm the JDBC URL points to the database containing the table","Re-check that the table still exists (it may have been dropped/renamed)","Retry after correcting identifiers; the schema cache is rebuilt per read"],"exampleFix":"// before\ntable-names = [\"mydb.MyTable\"]\n// after\ntable-names = [\"MYDB.MYTABLE\"]","handlingStrategy":"validation","validationCode":"-- confirm exact stored identifier casing\nSELECT TABSCHEMA, TABNAME FROM SYSCAT.TABLES WHERE UPPER(TABNAME)='MYTABLE';","typeGuard":null,"tryCatchPattern":"try { runPipeline(); } catch (SeaTunnelException e) { if (e.getMessage().startsWith(\"Can't obtain schema\")) { fixTableIdentifierCasing(); } }","preventionTips":["Use DB2's canonical uppercase identifiers in table lists","Confirm the JDBC URL targets the correct database","Re-verify table existence after renames/drops"],"tags":["db2","schema","cdc","not-found"],"backgroundTag":"schema-validation-failed","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"}