{"record":{"id":"739276b2a1a5ff84","repo":"apache/seatunnel","slug":"table-tablepath-does-not-exist-in-catalog-cat","errorCode":null,"errorMessage":"Table ${tablePath} 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-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/catalog/HudiCatalog.java","lineNumber":182,"sourceCode":"    public boolean tableExists(TablePath tablePath) throws CatalogException {\n        String basePath = inferTablePath(tableParentDfsPathStr, tablePath);\n        try {\n            return fs.exists(new Path(basePath, HoodieTableMetaClient.METAFOLDER_NAME))\n                    && fs.exists(\n                            new Path(\n                                    new Path(basePath, HoodieTableMetaClient.METAFOLDER_NAME),\n                                    HoodieTableConfig.HOODIE_PROPERTIES_FILE));\n        } catch (IOException e) {\n            throw new CatalogException(\n                    \"Error while checking whether table exists under path:\" + basePath, e);\n        }\n    }\n\n    @Override\n    public CatalogTable getTable(TablePath tablePath)\n            throws CatalogException, TableNotExistException {\n        if (!tableExists(tablePath)) {\n            throw new TableNotExistException(name(), tablePath);\n        }\n        HoodieTableMetaClient hoodieTableMetaClient =\n                HoodieTableMetaClient.builder()\n                        .setBasePath(inferTablePath(tableParentDfsPathStr, tablePath))\n                        .setConf(HadoopFSUtils.getStorageConfWithCopy(hadoopConf))\n                        .build();\n        HoodieTableType tableType = hoodieTableMetaClient.getTableType();\n        HoodieTableConfig tableConfig = hoodieTableMetaClient.getTableConfig();\n        TableSchema tableSchema = convertSchema(TableSchema.builder(), tableConfig);\n        List<String> partitionFields = null;\n        if (tableConfig.getPartitionFields().isPresent()) {\n            partitionFields = Arrays.asList(tableConfig.getPartitionFields().get());\n        }\n\n        Map<String, String> options = new HashMap<>();\n        if (tableConfig.getRecordKeyFields().isPresent()) {\n            options.put(\n                    RECORD_KEY_FIELDS.key(),","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hudi/src/main/java/org/apache/seatunnel/connectors/seatunnel/hudi/catalog/HudiCatalog.java#L164-L200","documentation":"Thrown by HudiCatalog.getTable() as a standard TableNotExistException when tableExists() returns false for the requested TablePath. This is the catalog's contract for reading a table schema that is not present under the configured parent path with valid Hudi metadata.","triggerScenarios":"Calling getTable(tablePath) (e.g., during job startup schema resolution) when <basePath>/.hoodie/hoodie.properties does not exist: table never created, wrong database/table name, or table written to a different root than table_parent_dfs_path.","commonSituations":"Typo in table name or database in the SeaTunnel config; Hudi table created by another tool at a different location; catalog's table_parent_dfs_path not pointing to the Hudi table root; case-sensitivity mismatch on object stores.","solutions":["Verify the exact database.table path exists and contains .hoodie/hoodie.properties on the filesystem.","Create the table first with catalog.createTable() or point the config at the existing table.","Align the catalog's table_parent_dfs_path with the real Hudi tables root.","Check case/namespace differences (S3 keys are case-sensitive)."],"exampleFix":"// before\nCatalogTable t = catalog.getTable(TablePath.of(\"mydb\",\"orders\")); // fails if missing\n// after\nif (catalog.tableExists(TablePath.of(\"mydb\",\"orders\"))) {\n    CatalogTable t = catalog.getTable(TablePath.of(\"mydb\",\"orders\"));\n} else {\n    catalog.createTable(TablePath.of(\"mydb\",\"orders\"), schema, false);\n}","handlingStrategy":"validation","validationCode":"// Java\nif (!catalog.tableExists(TablePath.of(db, tbl))) {\n    throw new IllegalStateException(\"Table \" + db + \".\" + tbl + \" not found; check path/config\");\n}","typeGuard":null,"tryCatchPattern":"// Java\ntry {\n    CatalogTable t = catalog.getTable(tablePath);\n} catch (TableNotExistException e) {\n    // create table or fail fast with a clear config-error message\n}","preventionTips":["Always check tableExists before getTable in generic code.","Double-check database.table names in SeaTunnel config files.","Confirm .hoodie/hoodie.properties exists at the table location.","Verify catalog table_parent_dfs_path matches the Hudi tables root."],"tags":["hudi","catalog","not-found"],"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"}