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(ingestion/tableau): Fix tableau custom sql lineage gap #10359

Conversation

shubhamjagtap639
Copy link
Contributor

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Apr 23, 2024
assert mcp.entityUrn == expected_entity_urn

csql_urn = "urn:li:dataset:(urn:li:dataPlatform:tableau,09988088-05ad-173c-a2f1-f33ba3a13d1a,PROD)"
expected_upstream_table = "urn:li:dataset:(urn:li:dataPlatform:bigquery,my_bigquery_project.invent_dw.UserDetail,PROD)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

we need to fix the urn lowercasing behavior here - it's not really clear to me why that changed to begin with

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are considering bigquery as platform with case sensitive tables, hence urn contain table without lowercase.

https://github.com/shubhamjagtap639/datahub/blob/725c85815bfc83e2accf1bbb5fa2c9be637dde88/metadata-ingestion/src/datahub/sql_parsing/sql_parsing_common.py#L8

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok that's fine

@@ -1693,7 +1693,7 @@ def parse_custom_sql(
) -> Optional["SqlParsingResult"]:
database_info = datasource.get(c.DATABASE) or {
c.NAME: c.UNKNOWN.lower(),
c.CONNECTION_TYPE: "databricks",
c.CONNECTION_TYPE: datasource.get(c.CONNECTION_TYPE) or "databricks",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think the default of "databricks" makes sense - that should be removed

Copy link
Contributor Author

@shubhamjagtap639 shubhamjagtap639 Apr 29, 2024

Choose a reason for hiding this comment

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

Just wondering if removal of default as "databricks" doesn't affect any other thing. Might have some reason behind adding default as "databricks" in PR #9838

Let me know if it still needs to remove.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes let's remove it

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.

one last improvement, but otherwise looks good

@@ -1693,7 +1693,7 @@ def parse_custom_sql(
) -> Optional["SqlParsingResult"]:
database_info = datasource.get(c.DATABASE) or {
c.NAME: c.UNKNOWN.lower(),
c.CONNECTION_TYPE: "databricks",
c.CONNECTION_TYPE: datasource.get(c.CONNECTION_TYPE) or "databricks",
Copy link
Collaborator

Choose a reason for hiding this comment

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

yes let's remove it

assert mcp.entityUrn == expected_entity_urn

csql_urn = "urn:li:dataset:(urn:li:dataPlatform:tableau,09988088-05ad-173c-a2f1-f33ba3a13d1a,PROD)"
expected_upstream_table = "urn:li:dataset:(urn:li:dataPlatform:bigquery,my_bigquery_project.invent_dw.UserDetail,PROD)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

ok that's fine

@hsheth2 hsheth2 added the merge-pending-ci A PR that has passed review and should be merged once CI is green. label May 3, 2024
@anshbansal anshbansal merged commit ddb38e7 into datahub-project:master May 7, 2024
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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