{"record":{"id":"6bee9b4d6c3530ce","repo":"apache/seatunnel","slug":"table-tablepath-does-not-exist-in-catalog-hive","errorCode":null,"errorMessage":"Table ${tablePath} does not exist in catalog hive","messagePattern":"Table (.+?) does not exist in catalog hive","errorType":"exception","errorClass":"TableNotExistException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveMetaStoreCatalog.java","lineNumber":613,"sourceCode":"                throw new DatabaseNotExistException(\"hive\", databaseName);\n            }\n            return getClient().getAllTables(databaseName);\n        } catch (TException e) {\n            throw new CatalogException(\"Failed to list tables in database: \" + databaseName, e);\n        }\n    }\n\n    @Override\n    public boolean tableExists(TablePath tablePath) throws CatalogException {\n        return tableExists(tablePath.getDatabaseName(), tablePath.getTableName());\n    }\n\n    @Override\n    public CatalogTable getTable(TablePath tablePath)\n            throws CatalogException, TableNotExistException {\n        try {\n            if (!tableExists(tablePath.getDatabaseName(), tablePath.getTableName())) {\n                throw new TableNotExistException(\"hive\", tablePath);\n            }\n            Table hiveTable = getTable(tablePath.getDatabaseName(), tablePath.getTableName());\n            return convertHiveTableToCatalogTable(hiveTable);\n        } catch (TableNotExistException e) {\n            throw e;\n        } catch (HiveConnectorException e) {\n            throw new CatalogException(\"Failed to get table: \" + tablePath, e);\n        }\n    }\n\n    @Override\n    public void createTable(TablePath tablePath, CatalogTable table, boolean ignoreIfExists)\n            throws TableAlreadyExistException, DatabaseNotExistException, CatalogException {\n        try {\n            if (!databaseExists(tablePath.getDatabaseName())) {\n                throw new DatabaseNotExistException(\"hive\", tablePath.getDatabaseName());\n            }\n","sourceCodeStart":595,"sourceCodeEnd":631,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveMetaStoreCatalog.java#L595-L631","documentation":"This error is raised by HiveMetaStoreCatalog.getTable when the Hive Metastore reports that the requested table does not exist in the given database. It fires when a caller (e.g. a source/sink or catalog operation) looks up a table whose tableName is absent from the Metastore, typically because the table name is misspelled, the wrong database was passed, or the table was dropped before the job ran.","triggerScenarios":"Calling getTable(tablePath) (or jobs resolving the source/sink table) for a table that does not exist — wrong database/table name, table not yet created, or querying the wrong metastore.","commonSituations":"Typos in table_path config; table created in a different namespace; schema was dropped between job submission and run; typo in case-sensitive name.","solutions":["Verify the table exists with `SHOW TABLES IN <db>` in Hive or catalog.tableExists(tablePath).","Check the table_path/database/table config values for typos and correct case.","Confirm the catalog's hive-conf-dir points to the cluster hosting the table.","Create the table first if the job expects it to pre-exist."],"exampleFix":"// before\nCatalogTable t = catalog.getTable(TablePath.of(\"sales\", \"orders\"));\n// after\nif (catalog.tableExists(TablePath.of(\"sales\", \"orders\"))) {\n    CatalogTable t = catalog.getTable(TablePath.of(\"sales\", \"orders\"));\n}","handlingStrategy":"validation","validationCode":"TablePath path = TablePath.of(db, tbl);\nif (!catalog.tableExists(path)) {\n    throw new IllegalArgumentException(\"Table not found: \" + path);\n}\nCatalogTable table = catalog.getTable(path);","typeGuard":null,"tryCatchPattern":"try {\n    return catalog.getTable(tablePath);\n} catch (TableNotExistException e) {\n    // handle missing table: create it, skip, or user-facing error\n}","preventionTips":["Call tableExists(tablePath) before getTable.","Verify table_path config values with SHOW TABLES IN <db>.","Ensure upstream jobs that create the table complete before consumers run."],"tags":["hive","catalog","table-not-exist","metastore"],"backgroundTag":"entity-not-found","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"}