Skip to content

Conversation

@Lizard-tlt
Copy link

Links for datasets like a file are not correct in Teams notifications.
Part of delimiters "/" in a URL should be replaced on "%2F" symbols.

For example, before changes:
http://xx.xx.xx.xx:9002/dataset/urn:li:dataset:(urn:li:dataPlatform:dbfs,/dream_team/cross_banner,PROD)/Schema?schemaFilter=ban_1_Banner

And after changes:
http://xx.xx.xx.xx:9002/dataset/urn:li:dataset:(urn:li:dataPlatform:dbfs,%2Fdream_team%2Fcross_banner,PROD)/Schema?schemaFilter=ban_1_Banner

urn = urn.replace("/", "%2F")
return f"{base_url}/{ENTITY_TYPE_TO_URL_PATH_MAP[entity_type]}/{urn}/"

def make_entity_url(urn: str, entity_type: str, base_url: str) -> str:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to do even more general-purpose URL encoding here! There should be an easy to use python method for this :)

@github-actions
Copy link

Unit Test Results (build & test)

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 175affe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants