{"record":{"id":"f28220582369296c","repo":"apache/iceberg","slug":"invalid-view-identifier-s-f28220","errorCode":null,"errorMessage":"Invalid view identifier: %s","messagePattern":"Invalid view identifier: (.+?)","errorType":"exception","errorClass":"NoSuchViewException","httpStatus":404,"severity":"error","filePath":"core/src/main/java/org/apache/iceberg/view/BaseMetastoreViewCatalog.java","lineNumber":67,"sourceCode":"  }\n\n  @Override\n  public String name() {\n    return super.name();\n  }\n\n  @Override\n  public View loadView(TableIdentifier identifier) {\n    if (isValidIdentifier(identifier)) {\n      ViewOperations ops = newViewOps(identifier);\n      if (ops.current() == null) {\n        throw new NoSuchViewException(\"View does not exist: %s\", identifier);\n      } else {\n        return new BaseView(ops, ViewUtil.fullViewName(name(), identifier));\n      }\n    }\n\n    throw new NoSuchViewException(\"Invalid view identifier: %s\", identifier);\n  }\n\n  @Override\n  public ViewBuilder buildView(TableIdentifier identifier) {\n    return new BaseViewBuilder(identifier);\n  }\n\n  protected class BaseViewBuilder implements ViewBuilder {\n    private final TableIdentifier identifier;\n    private final Map<String, String> properties = Maps.newHashMap();\n    private final List<ViewRepresentation> representations = Lists.newArrayList();\n    private Namespace defaultNamespace = null;\n    private String defaultCatalog = null;\n    private Schema schema = null;\n    private String location = null;\n\n    protected BaseViewBuilder(TableIdentifier identifier) {\n      Preconditions.checkArgument(","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/core/src/main/java/org/apache/iceberg/view/BaseMetastoreViewCatalog.java#L49-L85","documentation":"loadView first validates the TableIdentifier against the catalog's identifier validation (isValidIdentifier). If the identifier is invalid for this catalog (e.g. contains disallowed namespace levels), it throws NoSuchViewException('Invalid view identifier') without consulting the metastore.","triggerScenarios":"Calling loadView with an identifier whose namespace depth or characters are invalid for this catalog implementation (e.g. multi-level namespaces on a two-level metastore).","commonSituations":"Passing a table identifier built for a different catalog type; string parsing producing wrong namespace segments; using dots inconsistently.","solutions":["Inspect the identifier: print identifier.namespace() and name() to confirm segmentation","Use a TableIdentifier from TableIdentifier.of with the correct namespace levels for this catalog","Validate with catalog-level parsing utilities before calling loadView"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"TableIdentifier ident = TableIdentifier.of(Namespace.of(namespaceLevels), viewName); // build with the exact namespace depth this catalog expects","typeGuard":null,"tryCatchPattern":"try { return catalog.loadView(identifier); } catch (NoSuchViewException e) { if (e.getMessage().contains(\"Invalid\")) { fixIdentifier(); } throw e; }","preventionTips":["Construct TableIdentifier programmatically, not by string splitting","Check the catalog's expected namespace depth (e.g. 2-level metastores)","Do not reuse identifiers across different catalog implementations"],"tags":["catalog","view","identifier"],"backgroundTag":"invalid-identifier","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}