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(tableau): fixes missed lineage #12434

Merged
merged 19 commits into from
Jan 30, 2025

Conversation

sgomezvillamor
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 Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
...on/src/datahub/ingestion/source/tableau/tableau.py 89.15% <100.00%> (+0.03%) ⬆️
...datahub/ingestion/source/tableau/tableau_common.py 92.23% <ø> (ø)

... and 1345 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f527c5e...b7bc056. Read the comment docs.

@sgomezvillamor sgomezvillamor force-pushed the feature/ing-799/fix-tableau-missing-lineage branch from 1897bdb to b5fc250 Compare January 27, 2025 06:30
@github-actions github-actions bot requested a deployment to datahub-wheels (Preview) January 27, 2025 06:30 Abandoned
@sgomezvillamor sgomezvillamor marked this pull request as ready for review January 27, 2025 06:31
@sgomezvillamor sgomezvillamor changed the title WIP fix(tableau): fixes missed lineage fix(tableau): fixes missed lineage Jan 27, 2025
c.NAME: c.UNKNOWN.lower(),
c.CONNECTION_TYPE: datasource.get(c.CONNECTION_TYPE),
database_info = {
c.ID: datasource.get(c.DATABASE, {}).get(c.ID),
Copy link
Collaborator

Choose a reason for hiding this comment

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

the field database is Optional in GraphQL Spec, i.e. the key database can have value set as None. This case does not get covered by the statement datasource.get(c.DATABASE, {}).get(c.ID) which would throw error. Maybe replace it by (datasource.get(c.DATABASE) or {}).get(c.ID) ?

I'd also suggest a refactor to avoid this clause repeated over 3 times, if that makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed

>>> {'database': None}.get('database', {}).get('id')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'get'
>>> 

I always thought get could handle None, but nope, it's just for missing keys! 🤦

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Jan 29, 2025
@datahub-cyborg datahub-cyborg bot added needs-review Label for PRs that need review from a maintainer. and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Jan 29, 2025
@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed needs-review Label for PRs that need review from a maintainer. labels Jan 30, 2025
@sgomezvillamor sgomezvillamor merged commit d091fff into master Jan 30, 2025
189 of 190 checks passed
@sgomezvillamor sgomezvillamor deleted the feature/ing-799/fix-tableau-missing-lineage branch January 30, 2025 13:35
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 pending-submitter-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants