diff --git a/docs/glossary/business-glossary.md b/docs/glossary/business-glossary.md index f77dc8d4f7a9e..956f09ba52612 100644 --- a/docs/glossary/business-glossary.md +++ b/docs/glossary/business-glossary.md @@ -108,6 +108,26 @@ In order to delete a Term or Term Group, you need to go to the entity page of wh

+## Hard Deleting Glossary Entities + +To hard delete glossary nodes and terms, use the `datahub delete` command with the `--hard` flag. This action is irreversible, so use it with caution. + +- **Command Overview**: Use `datahub delete` to delete glossary entities. +- **Entity Types**: Differentiate between `glossaryNode` and `glossaryTerm`. +- **Hard Delete Flag**: The `--hard` flag is crucial for permanent deletion. +- **Dry Run Option**: Use `--dry-run` to preview the deletion impact safely. +- **Force Flag**: The `--force` flag bypasses confirmation prompts, use it carefully. + +Example commands: + +```bash +datahub delete --entity-type glossaryNode --query "*" --hard +``` + +```bash +datahub delete --entity-type glossaryTerm --query "*" --hard +``` + ## Adding a Term to an Entity diff --git a/docs/how/delete-metadata.md b/docs/how/delete-metadata.md index f720a66ce5765..a36c690b46395 100644 --- a/docs/how/delete-metadata.md +++ b/docs/how/delete-metadata.md @@ -29,6 +29,32 @@ All the commands below support the following options: - `-n/--dry-run`: Execute a dry run instead of the actual delete. - `--force`: Skip confirmation prompts. +### Hard Deleting Glossary Entities + +To manage glossary entities, specifically for hard deleting glossary nodes and terms, use the following commands: + +- **Command Overview**: Use the `datahub delete` command to delete glossary entities. + +- **Entity Types**: Differentiate between `glossaryNode` and `glossaryTerm` entity types. Use `glossaryNode` for nodes and `glossaryTerm` for terms. + +- **Hard Delete Flag**: The `--hard` flag is crucial for permanent deletion. Be cautious as this action is irreversible. + +- **Dry Run Option**: Use `--dry-run` to preview the impact of the deletion safely. + +- **Force Flag**: The `--force` flag can bypass confirmation prompts, but use it carefully. + +#### Example Commands: + +```bash +# Hard delete all glossary nodes +datahub delete --entity-type glossaryNode --query "*" --hard + +# Hard delete all glossary terms +datahub delete --entity-type glossaryTerm --query "*" --hard +``` + +These commands will permanently delete all glossary nodes and terms. Consider using `--dry-run` to see the impact before executing the deletion. + ### Selecting entities to delete You can either provide a single urn to delete, or use filters to select a set of entities to delete.