From 6ef0bf0dfdaafc7c2888919a8b52f48157b91349 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Fri, 2 Jul 2021 20:21:56 -0700 Subject: [PATCH] fix(ingest): convert superset timestamps to micros (#2827) * Previous values were in seconds, which rendered incorrectly in the UI. --- metadata-ingestion/src/datahub/ingestion/source/superset.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/metadata-ingestion/src/datahub/ingestion/source/superset.py b/metadata-ingestion/src/datahub/ingestion/source/superset.py index 5d26718db7..14006e29ad 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/superset.py +++ b/metadata-ingestion/src/datahub/ingestion/source/superset.py @@ -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