-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(tableau): fixes missed lineage #12434
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found.
... and 1345 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
1897bdb
to
b5fc250
Compare
c.NAME: c.UNKNOWN.lower(), | ||
c.CONNECTION_TYPE: datasource.get(c.CONNECTION_TYPE), | ||
database_info = { | ||
c.ID: datasource.get(c.DATABASE, {}).get(c.ID), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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! 🤦
…/github.com/datahub-project/datahub into feature/ing-799/fix-tableau-missing-lineage
…/github.com/datahub-project/datahub into feature/ing-799/fix-tableau-missing-lineage
Checklist