fix(ingest): convert superset timestamps to micros (#2827)

* Previous values were in seconds, which rendered incorrectly in the UI.
This commit is contained in:
Harshal Sheth 2021-07-02 20:21:56 -07:00 committed by GitHub
parent 8d6362419f
commit 6ef0bf0dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,7 @@ class SupersetSource(Source):
modified_actor = f"urn:li:corpuser:{(dashboard_data.get('changed_by') or {}).get('username', 'unknown')}"
modified_ts = int(
dp.parse(dashboard_data.get("changed_on_utc", "now")).timestamp()
dp.parse(dashboard_data.get("changed_on_utc", "now")).timestamp() * 1000
)
title = dashboard_data.get("dashboard_title", "")
# note: the API does not currently supply created_by usernames due to a bug, but we are required to
@ -263,7 +263,9 @@ class SupersetSource(Source):
)
modified_actor = f"urn:li:corpuser:{(chart_data.get('changed_by') or {}).get('username', 'unknown')}"
modified_ts = int(dp.parse(chart_data.get("changed_on_utc", "now")).timestamp())
modified_ts = int(
dp.parse(chart_data.get("changed_on_utc", "now")).timestamp() * 1000
)
title = chart_data.get("slice_name", "")
# note: the API does not currently supply created_by usernames due to a bug, but we are required to