{"record":{"id":"4676e7065a7c1968","repo":"apache/seatunnel","slug":"table-tablename-does-not-exist-in-catalog-cat","errorCode":null,"errorMessage":"Table ${tableName} does not exist in catalog ${catalogName}","messagePattern":"Table (.+?) does not exist in catalog (.+?)","errorType":"exception","errorClass":"TableNotExistException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalog.java","lineNumber":363,"sourceCode":"                            \"PluginName: %s, PluginType: %s, Message: %s\",\n                            PaimonSink.PLUGIN_NAME,\n                            PluginType.SINK,\n                            \"Cannot find paimon catalog factory\"));\n        }\n        return (PaimonCatalog)\n                catalogFactory.createCatalog(catalogFactory.factoryIdentifier(), readonlyConfig);\n    }\n\n    // --------------------------------------------------------------------------------------------\n    // alterTable\n    // --------------------------------------------------------------------------------------------\n\n    public void alterTable(\n            Identifier identifier, SchemaChange schemaChange, boolean ignoreIfNotExists) {\n        try {\n            catalog.alterTable(identifier, schemaChange, ignoreIfNotExists);\n        } catch (org.apache.paimon.catalog.Catalog.TableNotExistException e) {\n            throw new TableNotExistException(\n                    this.catalogName,\n                    TablePath.of(identifier.getDatabaseName(), identifier.getTableName()),\n                    e);\n        } catch (org.apache.paimon.catalog.Catalog.ColumnAlreadyExistException e) {\n            throw new CatalogException(\"ColumnAlreadyExistException: {}\", e);\n        } catch (org.apache.paimon.catalog.Catalog.ColumnNotExistException e) {\n            throw new CatalogException(\"ColumnNotExistException: {}\", e);\n        }\n    }\n\n    public void alterTable(\n            Identifier identifier, List<SchemaChange> schemaChanges, boolean ignoreIfNotExists) {\n        try {\n            catalog.alterTable(identifier, schemaChanges, ignoreIfNotExists);\n        } catch (org.apache.paimon.catalog.Catalog.TableNotExistException e) {\n            throw new TableNotExistException(\n                    this.catalogName,\n                    TablePath.of(identifier.getDatabaseName(), identifier.getTableName()),","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/catalog/PaimonCatalog.java#L345-L381","documentation":"Thrown by PaimonCatalog.alterTable when Paimon reports Catalog.TableNotExistException: the table identified by (databaseName, tableName) does not exist and ignoreIfNotExists=false. SeaTunnel rethrows its own TableNotExistException with the catalog name and the TablePath built from the identifier.","triggerScenarios":"Calling alterTable(identifier, schemaChange, false) on a missing table; identifier's database/table name wrong or wrong case; concurrent drop between existence check and alter.","commonSituations":"Schema-evolution jobs running against a table that was renamed/dropped; multi-environment setups (dev vs prod warehouse) with the table present in only one; case-sensitivity mistakes in identifiers.","solutions":["Check catalog.tableExists(TablePath.of(database, table)) before altering, or pass ignoreIfNotExists=true","Fix the identifier database/table names and case","Confirm the warehouse/metastore config targets the environment where the table exists","Recreate the table if it was dropped unintentionally before re-running the alter"],"exampleFix":"// before\ncatalog.alterTable(identifier, schemaChange, false);\n// after\nif (catalog.tableExists(TablePath.of(identifier.getDatabaseName(), identifier.getTableName()))) {\n    catalog.alterTable(identifier, schemaChange, false);\n}","handlingStrategy":"validation","validationCode":"TablePath tp = TablePath.of(identifier.getDatabaseName(), identifier.getTableName());\nif (!catalog.tableExists(tp)) {\n    LOG.warn(\"skip alter, table missing: {}\", tp);\n    return;\n}\ncatalog.alterTable(identifier, schemaChange, false);","typeGuard":null,"tryCatchPattern":"try {\n    catalog.alterTable(identifier, schemaChange, false);\n} catch (TableNotExistException e) {\n    LOG.error(\"alter failed, table {} missing in {}\", e.getTablePath(), e.getCatalogName());\n}","preventionTips":["Pre-check tableExists before schema changes","Pass ignoreIfNotExists=true in idempotent evolution jobs","Guard against concurrent drop/rename jobs on the same table","Verify identifiers case-sensitively against the target warehouse"],"tags":["paimon","alter-table","table-not-exist","schema-change"],"backgroundTag":"resource-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}