<@U06TM7M40RK> How do I delete every urn in a container?
To delete every URN in a container using DataHub, you can use the DataHub CLI with the --recursive
flag. This will ensure that all entities contained within the specified container are deleted. Here is a step-by-step guide:
-
Identify the Container URN: You need to find the URN of the container. This can be done by navigating to the relevant container in the DataHub UI and copying the URN.
-
Use the
datahub delete
Command: Use thedatahub delete
command with the--urn
option to specify the container URN and the--recursive
flag to delete all contained entities. -
Perform the Delete: By default, the delete command performs a soft delete. You can add the
--hard
flag to perform a hard delete if needed.
Here is an example command:
datahub delete --urn "urn:li:container:<container_urn>" --recursive
If you want to perform a hard delete, use the following command:
datahub delete --urn "urn:li:container:<container_urn>" --recursive --hard
Important Considerations:
- Dry Run: Use the
--dry-run
flag to see what entities will be deleted before actually performing the delete operation. - Force: The
--force
flag can be used to skip confirmation prompts.
Example with Dry Run and Force:
datahub delete --urn "urn:li:container:<container_urn>" --recursive --dry-run --force
Would you like more detailed information on how to perform this operation safely, or do you have any specific concerns about the deletion process?
Sources:
- <https://github.com/datahub-project/datahub/blob/master/docs/how/delete-metadata.md|Removing Metadata from DataHub>
- <Removing Metadata from DataHub | DataHub Delete Metadata Documentation> 0 button 0 button Hint: Mention @runllm in the thread for followups.