Hi Team, I have a question . I can change or updat...
# troubleshoot
j
Hi Team, I have a question . I can change or update name in this container? [picture below] if can change please advice me about how to. thank.
b
This isn't a container. That is a browsepath. You can update the browsepath aspect for the datasets
j
thank @better-orange-49102 Can you tell more about information how to update the browsepath step by step ?
b
It is really not easy, though, since you need to emit new aspects for what seems to be all your MySQL and mssql datasets
It would be easier to add a transformer to update the browsepath during ingestion, probably.
this code is IF you dont want to use a transformer and went to post-edit a dataset you should refer to https://github.com/datahub-project/datahub/tree/master/metadata-ingestion/examples/library for how to use the python api. the object to emit for browsepath is something like this
Copy code
urn=<dataset_urn>
paths=["/dataset/custom/dataset"]
mcp= MetadataChangeProposalWrapper(
      entityType="dataset",
      changeType=ChangeTypeClass.UPSERT,
      entityUrn=urn,
      aspectName="browsePaths",
      aspect=BrowsePathsClass(paths=paths),
)
but note that there is no easy way to find out which datasets need updating.
the easier way imo is to query mysql directly and
select urn from metadata_aspect_v2 where aspect="browsePaths" and version=0 and metadata="<specify the path>"
j
It's not easy, really. I think a other ways , I can get platform_instance name by using graphiQL ?
b
i don't think you can query for datasets with a specified browsepath using graphQL
j
it so sad. thank you so mush @better-orange-49102