{"record":{"id":"5893c69c05fbaec7","repo":"apache/iceberg","slug":"table-does-not-exist-s-5893c6","errorCode":null,"errorMessage":"Table does not exist: %s","messagePattern":"Table does not exist: (.+?)","errorType":"exception","errorClass":"NoSuchTableException","httpStatus":404,"severity":"error","filePath":"nessie/src/main/java/org/apache/iceberg/nessie/NessieIcebergClient.java","lineNumber":536,"sourceCode":"      if (existingToContent.getType() == Content.Type.ICEBERG_VIEW) {\n        throw new AlreadyExistsException(\"Cannot rename %s to %s. View already exists\", from, to);\n      } else if (existingToContent.getType() == Content.Type.ICEBERG_TABLE) {\n        throw new AlreadyExistsException(\"Cannot rename %s to %s. Table already exists\", from, to);\n      } else {\n        throw new AlreadyExistsException(\n            \"Cannot rename %s to %s. Another content of type %s with same name already exists\",\n            from, to, existingToContent.getType());\n      }\n    }\n  }\n\n  private static void validateFromContentForRename(\n      TableIdentifier from, Content.Type type, IcebergContent existingFromContent) {\n    if (existingFromContent == null) {\n      if (type == Content.Type.ICEBERG_VIEW) {\n        throw new NoSuchViewException(\"View does not exist: %s\", from);\n      } else if (type == Content.Type.ICEBERG_TABLE) {\n        throw new NoSuchTableException(\"Table does not exist: %s\", from);\n      } else {\n        throw new RuntimeException(\"Cannot perform rename for content type: \" + type);\n      }\n    } else if (existingFromContent.getType() != type) {\n      throw new RuntimeException(\n          String.format(\"content type of from identifier %s should be of %s\", from, type));\n    }\n  }\n\n  public boolean dropTable(TableIdentifier identifier, boolean purge) {\n    return dropContent(identifier, purge, Content.Type.ICEBERG_TABLE);\n  }\n\n  public boolean dropView(TableIdentifier identifier, boolean purge) {\n    return dropContent(identifier, purge, Content.Type.ICEBERG_VIEW);\n  }\n\n  private boolean dropContent(TableIdentifier identifier, boolean purge, Content.Type type) {","sourceCodeStart":518,"sourceCodeEnd":554,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/nessie/src/main/java/org/apache/iceberg/nessie/NessieIcebergClient.java#L518-L554","documentation":"Thrown by NessieIcebergClient.validateFromContentForRename when renaming Iceberg tables but the source identifier does not resolve to any content on the current Nessie ref (existingFromContent == null). The NoSuchTableException tells the caller the rename source table is absent. It is raised from renameContent before any Nessie commit is attempted.","triggerScenarios":"catalog.renameTable(from, to) where from does not exist on the pinned ref, or from exists only on another branch/tag, or from is actually a view being renamed via the table API with a mismatched type expectation path.","commonSituations":"Wrong Nessie branch configured in catalog properties; table dropped concurrently by another job; case-sensitive name mismatch; renaming across refs where the source ref lacks the table.","solutions":["Check catalog.tableExists(from) on the same client/ref before renaming.","Point the catalog at the correct Nessie branch/tag (client.ref / catalog property 'ref' or 'asset-ref').","Correct the from identifier (namespace + name spelling and case).","Catch NoSuchTableException and handle idempotently if renames may run repeatedly."],"exampleFix":"// before\ncatalog.renameTable(TableIdentifier.of(\"ns\", \"events\"), TableIdentifier.of(\"ns\", \"events_v2\")); // fails on wrong branch\n// after\ncatalog.setRef(\"main\");\nTableIdentifier from = TableIdentifier.of(\"ns\", \"events\");\nif (catalog.tableExists(from)) {\n  catalog.renameTable(from, TableIdentifier.of(\"ns\", \"events_v2\"));\n}","handlingStrategy":"validation","validationCode":"if (!catalog.tableExists(from)) { throw new IllegalStateException(\"Table not found: \" + from); }","typeGuard":null,"tryCatchPattern":"try { catalog.renameTable(from, to); } catch (NoSuchTableException e) { /* source missing on ref */ }","preventionTips":["Verify tableExists before rename","Pin the catalog to the intended Nessie branch/tag explicitly","Treat rename jobs as idempotent: skip if target exists and source missing"],"tags":["nessie","table","rename","not-found","catalog"],"backgroundTag":"entity-not-found","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"}