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

feat(redshift): Fetch lineage from unload queries #7041

Merged
merged 3 commits into from
Jan 24, 2023

Conversation

mmmeeedddsss
Copy link
Contributor

In this PR, I'm adding a new query to redshift ingestion source to fetch lineages created as a cause of unload queries (See redshift doc for unload statement).

This change has been manually tested. I observe the lineages from unload queries as:

[2023-01-11 23:41:22,159] INFO     {datahub.ingestion.source.sql.redshift:841} - Lineage[LineageItem(dataset=LineageDataset(platform=<LineageDatasetPlatform.S3: 's3'>, path='s3-bucket/some_prefix/0000_part_00'), upstreams={LineageDataset(platform=<LineageDatasetPlatform.REDSHIFT: 'redshift'>, path='prod.schema_1.table_1')}, collector_type=<LineageCollectorType.UNLOAD: 'unload'>, dataset_lineage_type='TRANSFORMED', query_parser_failed_sqls=[])]:LineageItem(dataset=LineageDataset(platform=<LineageDatasetPlatform.S3: 's3'>, path='s3-bucket/some_prefix/0000_part_00'), upstreams={LineageDataset(platform=<LineageDatasetPlatform.REDSHIFT: 'redshift'>, path='prod.schema_1.table_1')}, collector_type=<LineageCollectorType.UNLOAD: 'unload'>, dataset_lineage_type='TRANSFORMED', query_parser_failed_sqls=[])

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • 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.

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Jan 13, 2023
@jjoyce0510
Copy link
Collaborator

We are taking a look shortly!

Cheers
John

@anshbansal anshbansal added the community-contribution PR or Issue raised by member(s) of DataHub Community label Jan 19, 2023
@mmmeeedddsss
Copy link
Contributor Author

@treff7es a friendly reminder for the requested review 👋🏻

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 6f5cd3f into datahub-project:master Jan 24, 2023
ericyomi pushed a commit to ericyomi/datahub that referenced this pull request Feb 8, 2023
Co-authored-by: Tamas Nemeth <treff7es@gmail.com>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants