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(ingest/bigquery): Correctly upsert lineage_map when parsing view ddl #7403

Merged

Conversation

asikowitz
Copy link
Collaborator

@asikowitz asikowitz commented Feb 22, 2023

BigqueryTableIdentifier.get_table_name() and str(BigQueryTableRef(table_identifier).get_sanitized_table_ref()) are not equivalent:

>>> z = BigqueryTableIdentifier("project","dataset","table-name")
>>> z.get_table_name()
'project.dataset.table-name'
>>> str(BigQueryTableRef(z).get_sanitized_table_ref())
'projects/project/datasets/dataset/tables/table-name'

This means the if statement never returned True, and we would always set the lineage from view ddl to just the last processed upstream table.

Not tested end-to-end locally -- Mayuri will handle this

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 Feb 22, 2023
Copy link
Collaborator

@mayurinehate mayurinehate left a comment

Choose a reason for hiding this comment

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

LGTM. The CI failures are not related to changes in this PR, so ignoring.

Copy link
Contributor

@treff7es treff7es left a comment

Choose a reason for hiding this comment

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

lgtm

@treff7es treff7es merged commit c5c2bdb into datahub-project:master Feb 22, 2023
@asikowitz asikowitz deleted the bigquery-lineage-view-ddl-fix branch February 22, 2023 16:51
oleg-ruban pushed a commit to RChygir/datahub that referenced this pull request Feb 28, 2023
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants