How to Remove All Schema-Data from a Specific Bucket in DataHub?

Original Slack Thread

Hi team,

Within our DataHub we would like to be able to remove all schema-data from a specific bucket. For as far as I know there is not a method available to do this within DataHub. Is that correct?

For now we have created our own python method that uses the datahub_graph_client.get_related_entities method with the “PartOf” relation in a recursive way to retrieve all of the entities and then remove them one by one. Is this the best approach available? If it would help I could share our code.

Thanks in advance!
Pepijn & <@U052P0WU83C>

<@U01GZEETMEZ> might be able to help you out on this!

This is the best way for now. I’m working on adding a --recursive option to the delete cli, but your custom script using get_related_entities and (probably) hard_delete_entity is the best workaround for the time being