{"record":{"id":"379a11dd253c8d64","repo":"apache/seatunnel","slug":"failed-to-get-table-tablepath","errorCode":null,"errorMessage":"Failed to get table: ${tablePath}","messagePattern":"Failed to get table: (.+?)","errorType":"exception","errorClass":"CatalogException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveMetaStoreCatalog.java","lineNumber":620,"sourceCode":"\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\n            if (tableExists(tablePath.getDatabaseName(), tablePath.getTableName())) {\n                if (!ignoreIfExists) {\n                    throw new TableAlreadyExistException(\"hive\", tablePath);\n                }\n                return;\n            }\n","sourceCodeStart":602,"sourceCodeEnd":638,"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#L602-L638","documentation":"getTable() wraps any HiveConnectorException raised while fetching or converting the Hive table (getTable(db, tbl) or convertHiveTableToCatalogTable) into a CatalogException. The table exists but its metadata could not be retrieved or mapped to a CatalogTable.","triggerScenarios":"Calling getTable(tablePath) when the internal getTable() throws HiveConnectorException (metastore fetch failure) or convertHiveTableToCatalogTable fails on malformed/unsupported table metadata (e.g., unsupported SerDe, missing storage descriptor, unsupported data types).","commonSituations":"Tables with exotic SerDes or storage formats the converter cannot handle; corrupted HMS metadata; metastore RPC failure after the existence check; unsupported Hive column types.","solutions":["Look at the wrapped HiveConnectorException cause for the real failure (fetch vs conversion).","Check the Hive table's SerDe/storage format and column types are supported by the connector.","Verify metastore connectivity — the failure may be transient after the existence check.","Repair corrupted table metadata (e.g., MSCK REPAIR TABLE or recreate the table)."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// check supported storage format/types ahead of time\nString inputFormat = /* hive tbl property */ ;\n// ensure SerDe and column types are supported by the connector","typeGuard":null,"tryCatchPattern":"try {\n    return catalog.getTable(tablePath);\n} catch (CatalogException e) {\n    Throwable cause = e.getCause();\n    // inspect HiveConnectorException for fetch vs conversion failure\n    throw new RuntimeException(\"Cannot read Hive table metadata: \" + tablePath, cause);\n}","preventionTips":["Prefer standard storage formats (TextFile/ORC/Parquet) for tables read via this catalog.","Inspect wrapped causes to distinguish metastore fetch vs schema conversion problems.","Keep Hive column types within the connector's supported mapping."],"tags":["hive","catalog","metadata-conversion","serde"],"backgroundTag":"database-query-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}