Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(superset): handle comma in dataset table name #9656

Conversation

rinzool
Copy link
Contributor

@rinzool rinzool commented Jan 18, 2024

Checklist

Implementation

Used the make_dataset_urn function

Examples

Output:
A datasource has been created with urn urn:li:dataset:(urn:li:dataPlatform:athena,athena.some_db.My%2Cvirtual%2Ctable,PROD)

@github-actions github-actions bot added ingestion PR or Issue related to the ingestion of metadata community-contribution PR or Issue raised by member(s) of DataHub Community labels Jan 18, 2024
@rinzool rinzool force-pushed the fix/superset/manage-comma-in-table-name branch from 70709d9 to af9e234 Compare January 18, 2024 10:27
@rinzool rinzool force-pushed the fix/superset/manage-comma-in-table-name branch from af9e234 to c0e247a Compare January 18, 2024 10:30
rf"[{''.join(RESERVED_CHARACTERS)}]",
self.config.reserved_characters_replacement,
table_name,
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we use our make_dataset_urn helper, it automatically handles this escaping logic. It also has the reserved characters set built in, so we shouldn't need that to be configurable here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's nice! Thank you
It's way more simple like that

Thanks a lot for your reviews, I now have a better understanding of Datahub project

@rinzool rinzool force-pushed the fix/superset/manage-comma-in-table-name branch from 70e4814 to 5bfd976 Compare January 19, 2024 09:16
…rinzool/datahub into fix/superset/manage-comma-in-table-name
@rinzool rinzool force-pushed the fix/superset/manage-comma-in-table-name branch from 07d07b1 to 5855f0b Compare January 19, 2024 12:03
Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

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

LGTM

@hsheth2 hsheth2 added the merge-pending-ci A PR that has passed review and should be merged once CI is green. label Jan 19, 2024
@rinzool rinzool changed the title fix(superset): add warning and skip table input if it contains a reserved character fix(superset): handle comma in dataset table name Jan 19, 2024
@anshbansal anshbansal merged commit 6116599 into datahub-project:master Jan 20, 2024
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-contribution PR or Issue raised by member(s) of DataHub Community ingestion PR or Issue related to the ingestion of metadata merge-pending-ci A PR that has passed review and should be merged once CI is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants