Hi How should I fill in this `access token`when I ...
# getting-started
e
Hi How should I fill in this `access token`when I initialize it
datahub init
/root/.datahubenv already exists. Overwrite? [y/N]: y
Configure which datahub instance to connect to
Enter your DataHub host [<http://localhost:8080>]:
`Enter your DataHub access token (Supports env vars via
{VAR_NAME}
syntax) []:`
1
m
@early-crayon-23965 for the oss datahub, you can just hit enter to skip entering an access token. The access token feature in the datahub cli is used for authentication when sending metadata to the cloud-hosted version of DataHub.
e
datahub delete --urn "DEV"
When I execute this command to remove the URN, it will report an error like this:
Received error, please check your ~/.datahubenv
{'exceptionClass': 'com.linkedin.restli.server.RestLiServiceException', 'stackTrace': "com.linkedin.restli.server.RestLiServiceException ...........java.lang.reflect.Method.invoke(Method.java:498)\n\tat com.linkedin.restli.internal.server.RestLiMethodInvoker.doInvoke(RestLiMethodInvoker.java:172)\n\t... 75 more\n", 'message': 'INTERNAL SERVER ERROR', 'status': 500}
I didn't think anything else in the env file would affect my ability to delete it, so I thought I'd need to set the appropriate token
@mammoth-bear-12532
m
Hmm do other Datahub commands like
ingest list-runs
work?
the urn you are deleting seems like a strange urn though. Usually urns will look like
urn:li:dataset:…
e
Yes, it works
datahub ingest list-runs
👍 1
m
Maybe use a valid urn and see if you are able to delete the metadata?
e
I'm not sure what you mean. I'm specifying the URN when I specify env in the YML file My YML file looks like this:
source:
type: mysql
config:
# Coordinates
host_port: url:3306
database: arc
env: DEV
# Credentials
username: username
password: password
sink:
# sink configs
type: "datahub-rest"
config:
server: "<http://127.0.0.1:8080>"
@mammoth-bear-12532
m
@early-crayon-23965: DEV isn't really a URN
is:
urn:li:dataset:(urn:li:dataPlatform:snowflake,demo_pipeline.public.all_entities,PROD)
hopefully this helps you identify the urn in your setup
e
Thank you very much! I just successfully removed a URN from the example you gave But the one I want to remove is DEV I tried to use "`datahub delete --urn "urnlidataset:(urnlidataPlatform:DEV)`"" to delete it, but it didn't work
Successfully deleted urn:li:dataset:(urn:li:dataPlatform:DEV). 0 rows deleted
m
Hi @early-crayon-23965 DEV isn’t really a data platform, it is an environment. Are you trying to delete all things that in the “DEV” environment?
e
Yes!
m
there isn't a single command to do this... you would have to find all the entities in the DEV environment and delete them one by one
e
OK! THANK YOU !!!