-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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): Record observed lineage timestamps for Looker and LookML sources #7735
feat(ingest/looker): Record observed lineage timestamps for Looker and LookML sources #7735
Conversation
e66adde
to
1224d2e
Compare
@@ -841,6 +843,10 @@ def _to_metadata_events( # noqa: C901 | |||
UpstreamClass( | |||
dataset=view_urn, | |||
type=DatasetLineageTypeClass.VIEW, | |||
auditStamp=AuditStamp( | |||
time=int(observed_lineage_ts.timestamp() * 1000), | |||
actor="urn:li:corpuser:datahub", |
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.
it'd be good to extract this out into a constant
@@ -21,6 +21,7 @@ | |||
) | |||
|
|||
import pydantic | |||
from datahub.metadata.com.linkedin.pegasus2avro.common import AuditStamp |
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.
looks like linter doesn't like the import sorting here
@ANich - we haven't seen movement on this PR for a little while- are you still interested in contributing? If so, please let us know within the week, or we'll need to close this one for inactivity. |
Hey @laulpogan @anshbansal I'll pick this back up in the next couple days if that's okay. Will ping for a re-review |
810923f
to
2eb7aa2
Compare
2eb7aa2
to
572ffd7
Compare
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.
We should to add tz to now() calls, but otherwise lgtm
@@ -786,6 +789,7 @@ def _to_metadata_events( # noqa: C901 | |||
if self.upstream_views is not None: | |||
assert self.project_name is not None | |||
upstreams = [] | |||
observed_lineage_ts = datetime.datetime.now() |
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.
observed_lineage_ts = datetime.datetime.now() | |
observed_lineage_ts = datetime.datetime.now(tz=timezone.utc) |
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.
Updated! Thanks for the review
@@ -1615,11 +1617,16 @@ def _get_upstream_lineage( | |||
|
|||
# Generate the upstream + fine grained lineage objects. | |||
upstreams = [] | |||
observed_lineage_ts = datetime.now() |
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.
needs tz
572ffd7
to
137cb25
Compare
cypress test failures unrelated so merging. |
Adds timestamps to the Looker and LookML sources for lineage between Explores and Views as well as between Views and SQL tables/views.
Checklist
- [ ] Links to related issues (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