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(ingest): looker - support for simple column level lineage #6084

Merged

Conversation

shirshanka
Copy link
Contributor

Adds very simple column level lineage for looker
Table -> View
and
View -> Explore.

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 Sep 29, 2022
@github-actions
Copy link

Unit Test Results (metadata ingestion)

       8 files  ±0         8 suites  ±0   59m 1s ⏱️ + 2m 57s
   719 tests ±0     716 ✔️ ±0  3 💤 ±0  0 ±0 
1 440 runs  ±0  1 434 ✔️ ±0  6 💤 ±0  0 ±0 

Results for commit ece833c. ± Comparison against base commit 21a8718.

@github-actions
Copy link

Unit Test Results (build & test)

584 tests  ±0   580 ✔️ ±0   13m 9s ⏱️ -51s
143 suites ±0       4 💤 ±0 
143 files   ±0       0 ±0 

Results for commit ece833c. ± Comparison against base commit 21a8718.

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.

two nits, but neither is a show stopper so they can be done in a follow up

):
(view_name, field_path) = field.upstream_field.split(".")[
0
], ".".join(field.upstream_field.split(".")[1:])
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: use split(maxsplit=1)

if type_cls == ViewFieldType.DIMENSION and extract_column_level_lineage:
if field_dict.get("sql") is not None:
upstream_field_match = re.match(
r"^.*\${TABLE}\.(.*)$", field_dict["sql"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: add a comment explaining what this regex does

@shirshanka
Copy link
Contributor Author

thx @hsheth2

@shirshanka shirshanka merged commit 74d9fa2 into datahub-project:master Sep 29, 2022
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.

2 participants