{"record":{"id":"afeb55f365b5e8c5","repo":"apache/seatunnel","slug":"invalid-metalake-table-id","errorCode":null,"errorMessage":"Invalid metalake table id: ","messagePattern":"Invalid metalake table id: ","errorType":"exception","errorClass":"SeaTunnelException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/metadata/gravitino/GravitinoMetadataProvider.java","lineNumber":202,"sourceCode":"        } catch (IOException e) {\n            throw new SeaTunnelException(\"fail get tableSchema:\" + metaDataTableId, e);\n        }\n    }\n\n    /**\n     * Builds the metalake URL for Gravitino API calls.\n     *\n     * @return complete metalake URL\n     */\n    private String buildMetalakeUrl() {\n        String baseUri = uri.endsWith(\"/\") ? uri : uri + \"/\";\n        return baseUri + METALAKE_API_PATH + metalake + CATALOGS_PATH;\n    }\n\n    private String buildMetalakeUrlTableUrl(String metaDataTableId) {\n        final String[] split = metaDataTableId.split(\"\\\\.\");\n        if (split.length != 3) {\n            throw new SeaTunnelException(\"Invalid metalake table id: \" + metaDataTableId);\n        }\n        String catalog = split[0];\n        String schema = split[1];\n        String table = split[2];\n        String baseUri = uri.endsWith(\"/\") ? uri : uri + \"/\";\n        return baseUri\n                + METALAKE_API_PATH\n                + metalake\n                + CATALOGS_PATH\n                + \"/\"\n                + catalog\n                + SCHEMAS_PATH\n                + \"/\"\n                + schema\n                + TABLES_PATH\n                + \"/\"\n                + table;\n    }","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/metadata/gravitino/GravitinoMetadataProvider.java#L184-L220","documentation":"SeaTunnelException thrown by buildMetalakeUrlTableUrl when the metaDataTableId does not split into exactly 3 dot-separated parts (catalog.schema.table). The provider cannot construct the Gravitino table URL without all three segments.","triggerScenarios":"Calling tableSchema() with an id like \"mydb.mytable\" (missing catalog), \"catalog..table\" (empty schema), or an id using different separators than '.'.","commonSituations":"Users passing a two-part table identifier copied from a JDBC/Spark context; extra dots from quoted identifiers; passing a full Gravitino HTTP URL instead of the dotted id.","solutions":["Pass the id as exactly \"catalog.schema.table\" with three dot-separated parts.","Trim or unquote the identifier if it contains escaped dots or whitespace.","If the input may be a URL, extract catalog/schema/table first instead of passing the URL string."],"exampleFix":"// before\nprovider.tableSchema(\"mydb.mytable\");\n// after\nprovider.tableSchema(\"mycatalog.mydb.mytable\");","handlingStrategy":"validation","validationCode":"static boolean isValidMetalakeTableId(String id) {\n    if (id == null) return false;\n    String[] parts = id.split(\"\\\\.\");\n    return parts.length == 3 && java.util.Arrays.stream(parts).allMatch(p -> !p.isEmpty());\n}\n// call before: if (!isValidMetalakeTableId(tableId)) throw new IllegalArgumentException(tableId);","typeGuard":null,"tryCatchPattern":"try {\n    return provider.tableSchema(tableId);\n} catch (SeaTunnelException e) {\n    if (e.getMessage().startsWith(\"Invalid metalake table id\")) {\n        throw new IllegalArgumentException(\"Expected 'catalog.schema.table', got: \" + tableId);\n    }\n    throw e;\n}","preventionTips":["Always pass three-part dotted identifiers.","Unquote/trim identifiers sourced from other systems.","Add a regex check ([^.]+\\.[^.]+\\.[^.]+) at config parse time."],"tags":["validation","gravitino","identifier","argument-format"],"backgroundTag":"invalid-argument-format","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"}