{"record":{"id":"2fef29b764473df0","repo":"apache/seatunnel","slug":"tablenotexistexception-catalogname-tablepath","errorCode":null,"errorMessage":"TableNotExistException: catalogName, tablePath","messagePattern":"TableNotExistException: catalogName, tablePath","errorType":"error_code","errorClass":"TableNotExistException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/catalog/DatabendCatalog.java","lineNumber":221,"sourceCode":"                            .getMetaData()\n                            .getTables(null, databaseName, tableName, new String[] {\"TABLE\"})) {\n                return resultSet.next();\n            }\n        } catch (SQLException e) {\n            throw new DatabendConnectorException(\n                    DatabendConnectorErrorCode.SQL_OPERATION_FAILED,\n                    \"Failed to check if table exists: \" + e.getMessage(),\n                    e);\n        }\n    }\n\n    @Override\n    public CatalogTable getTable(TablePath tablePath)\n            throws CatalogException, TableNotExistException {\n        checkOpen();\n\n        if (!tableExists(tablePath)) {\n            throw new TableNotExistException(catalogName, tablePath);\n        }\n\n        try (Connection connection = getConnection()) {\n            String databaseName = tablePath.getDatabaseName();\n            String tableName = tablePath.getTableName();\n\n            // Get table schema\n            List<Column> columns = new ArrayList<>();\n            try (ResultSet resultSet =\n                    connection.getMetaData().getColumns(null, databaseName, tableName, null)) {\n                while (resultSet.next()) {\n                    String columnName = resultSet.getString(\"COLUMN_NAME\");\n                    String typeName = resultSet.getString(\"TYPE_NAME\");\n                    int dataType = resultSet.getInt(\"DATA_TYPE\");\n                    int columnSize = resultSet.getInt(\"COLUMN_SIZE\");\n                    int decimalDigits = resultSet.getInt(\"DECIMAL_DIGITS\");\n                    String isNullable = resultSet.getString(\"IS_NULLABLE\");\n                    String remarks = resultSet.getString(\"REMARKS\");","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-databend/src/main/java/org/apache/seatunnel/connectors/seatunnel/databend/catalog/DatabendCatalog.java#L203-L239","documentation":"DatabendCatalog.getTable(tablePath) calls tableExists(tablePath) first; if the table is absent it throws SeaTunnel's standard TableNotExistException for (catalogName, tablePath). This is the API-declared checked exception meaning the requested table (database + table) does not exist in Databend.","triggerScenarios":"Calling getTable (directly or via catalogTable) with a TablePath whose database or table does not exist — table dropped or renamed, wrong schema in the TablePath, or the catalog is connected to a different Databend environment than the one where the table was created.","commonSituations":"Schema evolution/migration removed the table, dev-vs-prod mismatch, case or name typo in the sink/source table path, table created after the check ran in a race, or pointing at a tenant lacking the table.","solutions":["Confirm the exact database and table names on the target Databend instance (SHOW TABLES IN <db>) and correct the TablePath in the job config.","Create the table first (CREATE TABLE or via catalog createTable) before reading its metadata.","Verify the catalog URL/credentials point at the intended environment where the table exists."],"exampleFix":"// before\ngetTable(TablePath.of(\"analytics\", \"user_event\")) // table doesn't exist\n// after\n// CREATE TABLE analytics.user_event (...) first, or fix the name:\ngetTable(TablePath.of(\"analytics\", \"user_events\"))","handlingStrategy":"validation","validationCode":"// before calling getTable\nSHOW TABLES IN mydb; -- confirm the table name exists\nif (!catalog.tableExists(TablePath.of(\"mydb\", \"mytable\"))) {\n  throw new IllegalStateException(\"table missing, create it first\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  table = catalog.getTable(tablePath);\n} catch (TableNotExistException e) {\n  log.warn(\"table {} missing, creating schema\", tablePath);\n  catalog.createTable(tablePath, createTableConfig, false);\n  table = catalog.getTable(tablePath);\n}","preventionTips":["Generate TablePath values from a verified source (SHOW TABLES output) instead of hand-typing","Run table auto-creation (createTable with ignoreIfExists) before reading metadata","Confirm the catalog URL points at the environment where the table lives","Account for schema migrations that may drop/rename tables between job runs"],"tags":["databend","catalog","table-not-exist","metadata"],"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-14T11:17:12.474Z"}