Hi, I am running into some issues trying to delete...
# troubleshoot
f
Hi, I am running into some issues trying to delete all glossary terms via the CLI. When trying to run this command:
datahub delete --entity_type glossaryTerm --query "*" --soft -f
I am receiving this traceback in return:
Copy code
[2023-02-13 12:37:43,117] INFO     {datahub.cli.delete_cli:326} - Filter matched  glossaryTerm entities of None. Sample: []
No urns to delete. Maybe you want to change entity_type=glossaryTerm or platform=None to be something different?
Took 1.477 seconds to hard delete 0 versioned rows and 0 timeseries aspect rows for 0 entities.
It appears that the datahub-gms pod is unable to locate any of the glossary urns to delete. I am able to successfully ingest via the CLI so I know my environment variables are correct. Not quite sure what is happening but I would love to be able to mass delete all the glossary terms/nodes. Any help appreciated! Thanks
๐Ÿ‘€ 1
i
Hello Dylan, What version of DataHub are you running? How is DataHub deployed? Once deleted through the cli are you able to get the data given the deleted urns?
f
Hi, Pedro. Thanks for the quick response. The datahub version is 9.6.1 deployed via a Kubernetes cluster. The CLI version is 9.6.4. After deleting a single urn through the CLI I am able to see the data still however the status is marked
"removed": true
i
Hello Dylan, The status marked removed status means the deleted entities were soft deleted.
This means they do not appear in the UI but still exist in the databases. To truly delete them, pass the โ€”hard flag in the delete command
f
Thanks Pedro, I am able to delete a single urn but when I try to mass delete the glossary term entities using
datahub delete --entity_type glossaryTerm --query "*" --soft -f
it is coming up with an empty list.
b
Hi @flat-match-62670! Thanks for the report. My guess is that something is going wrong with the delete API in the case specifically of glossary terms. We'll try to reproduce this. Until then, I'd recommend running hard delete for each manually. To do so, you can issue a Search in DataHub for all Glossary Terms, then Click the 3-dot "more" button in the top-right side of search and select 'Download as CSV'. Once you have glossary terms downloaded, you can write a basic python script or equivalent to iterate through each URN and hard delete. Not an ideal solution but it could work to unblock you in the immediate term ๐Ÿ™‚
f
Thanks @big-carpet-38439 that was actually the next step I was going to take. Could you tell the input I need to search for all Glossary Terms in the UI?
b
Sure - let me send you a sample from our demo site!
f
Thank you! @big-carpet-38439
b
no prob at all. let me know how that goes ๐Ÿ™‚
a
@echoing-airport-49548 might be able to speak to this!