Area: Product Issues
Sub-Area: Container Deletion / Search Index
Applies to: OSS + Cloud
Issue
A container that you tried to remove still shows in the browse sidebar or in search results. A hard browser refresh does not remove it.
You Might Be Asking
- Why does a deleted container still show up in the DataHub UI after I refresh the page?
- How do I permanently remove a container and everything in it?
- Is there a way to force DataHub to re-sync the search index after a container deletion?
- Will deleting child datasets also remove the parent container from the UI?
Cause
A container's page in the DataHub UI has no delete action. The bulk Delete action in search results soft deletes a container, but it does not delete the datasets and schemas in it. A container stays visible for one of these reasons:
- Datasets and schemas in the container still exist. Their browse paths keep the container in the browse sidebar.
- An ingestion source still emits the container. Each run creates it again.
- After a hard delete, the search index still holds a document for the container.
Solution
-
If an ingestion source still emits the container, change that source's patterns first. If you do not, the next run creates the container again.
-
Delete the container with the DataHub CLI and
--recursive. First run it with--dry-runto see what it will remove:datahub delete --urn "urn:li:container:<id>" --recursive --dry-runThen run the same command without
--dry-run. The CLI soft deletes by default. Add--hardto remove the entities permanently.Without
--recursive, the datasets and schemas in the container stay, and they keep the container visible. -
If the container still shows after a hard delete, the search index has a stale document.
- On DataHub Cloud, contact DataHub Support with the container URN.
- On a self-hosted deployment, run the RestoreIndices job with
datahub-upgrade -u RestoreIndices, or with the Helm restore-indices job, as described in Restore Indices. RestoreIndices replays rows from the database, so it does not remove documents for deleted entities unless you add-a clean. Thecleanoption empties the whole index before it restores it and ignores URN filters, so plan for a full reindex. - To replay only some entities, add
-a urnLike=with a SQL LIKE pattern, such as-a urnLike=urn:li:container:%. This refreshes entities that still exist. It does not remove the document of a deleted entity.
Do not use the rollbackIngestion GraphQL mutation to fix the index. It removes all metadata that one ingestion run wrote.
The delete commands and their options are in Removing Metadata from DataHub.
Related Documentation
Tags: ghost-entities, container-deletion, search-index, soft-delete, hard-delete, browse-sidebar, reindex