Hi <@U06TM7M40RK>, how do I bulk delete datasets with prefix test_*?
To bulk delete datasets with a prefix test_*
in DataHub, you can use the DataHub CLI with the --query
option to filter datasets by their name. Here’s a step-by-step guide:
-
Use the
datahub delete
Command: Utilize thedatahub delete
command with the--query
option to specify the prefixtest_*
. -
Perform a Hard Delete: Add the
--hard
flag to ensure that the deletion is a hard delete. -
Dry Run: It is recommended to use the
--dry-run
flag initially to see what entities will be deleted before actually performing the delete operation.
Here is an example command:
datahub delete --entity-type dataset --query "test_*" --hard --dry-run
Example Command Breakdown:
--entity-type dataset
: Specifies that the entity type is a dataset.--query "test_*"
: Filters datasets with the prefixtest_*
.--hard
: Performs a hard delete, which physically deletes all rows for all aspects of the entity.--dry-run
: Shows what entities will be deleted without actually performing the deletion.
Once you are sure about the entities to be deleted, you can remove the --dry-run
flag to perform the actual deletion:
datahub delete --entity-type dataset --query "test_*" --hard
Would you like more detailed information on any specific part of this process?
Sources:
- https://datahubspace.slack.com/archives/C029A3M079U/p1723502500.194569|https://datahubspace.slack.com/archives/C029A3M079U/p1723502500.194569 1 button 0 button Hint: Mention <@U06TM7M40RK> in the thread for followups.
Hi ! Did this interaction resolve your issue or do you still require assistance ?
Please tag @ RunLLM if you still need further assistance !
Or tag @Datahub Community Support if you require a person to take a look
Hope this helps ! ><