I’m having issues deleting entities with the cli e...
# troubleshoot
a
I’m having issues deleting entities with the cli either with a specific URN or a filter. Can anyone help? If I use a urn like:
Copy code
datahub delete --urn "urn:li:dataPlatform:awsdms_apply_exceptions"
datahub delete --urn "urn:li:dataPlatform:mongodb"
I get an error about json decoding:
Copy code
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
If I try with a filter like
Copy code
datahub delete --entity_type dataset --platform mongodb
I get an error about the client not being authorised
Copy code
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: <http://3.72.60.6:8080/entities?action=search>
I am using an API key and my user is an Admin in Datahub.
šŸ“– 1
šŸ” 1
l
Hey there šŸ‘‹ I'm The DataHub Community Support bot. I'm here to help make sure the community can best support you with your request. Let's double check a few things first: āœ… There's a lot of good information on our docs site: www.datahubproject.io/docs, Have you searched there for a solution? āœ… button āœ… It's not uncommon that someone has run into your exact problem before in the community. Have you searched Slack for similar issues? āœ… button Did you find a solution to your issue? āŒ Sorry you weren't able to find a solution. I'm sending you some tips on info you can provide to help the community troubleshoot. Whenever you feel your issue is solved, please react āœ… to your original message to let us know!
g
Hi @ancient-queen-15575 I am on datahub version 0.10.2.3. Below command worked for me
datahub delete by-filter --urn "<urn>"
a
Turned out the issue was not use the right name for the env var with the api token. I had called it
DATAHUB_API_KEY
but it actually needed to be called
DATAHUB_GMS_TOKEN
. Figured that out after I saw a list of support env var names in the docs here https://datahubproject.io/docs/cli#environment-variables-supported