apache/seatunnel · error · SeaTunnelException
Can't obtain schema for table ${tableId}
Error message
Can't obtain schema for table ${tableId} What it means
After querying, PostgresSchema.readTableSchema checks whether the schema map contains an entry for the requested TableId; if not, it throws SeaTunnelException 'Can't obtain schema for table <id>'. Unlike error 592 the JDBC query succeeded, but no schema was returned for that exact table identifier.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-postgres/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/postgres/utils/PostgresSchema.java:90
for (TableId id : tables.tableIds()) {
TableId idWithCatalog = new TableId(tableId.catalog(), id.schema(), id.table());
if (tableMap.containsKey(idWithCatalog)) {
Table table =
CatalogTableUtils.mergeCatalogTableConfig(
tables.forTable(id), tableMap.get(idWithCatalog));
TableChanges.TableChange tableChange =
new TableChanges.TableChange(
TableChanges.TableChangeType.CREATE, table);
schemasByTableId.put(idWithCatalog, tableChange);
}
}
} catch (SQLException e) {
throw new SeaTunnelException(
String.format("Failed to read schema for table %s ", tableId), e);
}
if (!schemasByTableId.containsKey(tableId)) {
throw new SeaTunnelException(
String.format("Can't obtain schema for table %s ", tableId));
}
return schemasByTableId.get(tableId);
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Confirm the table exists: SELECT * FROM information_schema.tables WHERE table_schema='...' AND table_name='...'
- Make table-names match the exact case of the Postgres schema and table (quote if needed)
- Ensure the configured database contains the table; CDC reads schema from its own connection's database
- Grant the CDC user visibility of the table (USAGE on schema, SELECT on table)
Example fix
// before table-names = ["public", "Users"] // after table-names = ["public", "users"] # actual lowercase name in Postgres
Defensive patterns
Strategy: validation
Validate before calling
SELECT table_schema, table_name FROM information_schema.tables
WHERE lower(table_name) = lower('orders') AND table_schema = 'public'; Prevention
- Copy table names exactly from \dt output, including case
- Confirm the table is in the database the connector connects to
- Check the CDC user can see the table in information_schema
When it happens
Trigger: The table does not exist (or is not visible to the current user) so the catalog query returns no rows, or the requested TableId (database.schema.table, case-sensitive) does not match the key under which the schema was stored (idWithCatalog normalization mismatch).
Common situations: Typo in table name or wrong schema prefix in table-names config; table lives in a different database than configured; mixed-case identifiers requiring exact quoting; dropped table referenced by a still-running job config.
Related errors
- Can't obtain schema for table %s
- Cannot find table schema for table ${tableId}. Tried table i
- Unsupported alter table event:
- Unsupported alter table event:
- Unsupported type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/3f63ed921e1522d0.
Report an issue: GitHub.