Skip to content

Commit 1d89fc8

Browse files
committed
use changed_on_utc column
1 parent e0633da commit 1d89fc8

File tree

1 file changed

+4
-8
lines changed
  • metadata-ingestion/src/datahub/ingestion/source

1 file changed

+4
-8
lines changed

metadata-ingestion/src/datahub/ingestion/source/superset.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,9 @@ def construct_dashboard_from_api_data(
401401
)
402402

403403
modified_actor = f"urn:li:corpuser:{self.owner_info.get((dashboard_data.get('changed_by') or {}).get('id', -1), 'unknown')}"
404-
405404
now = datetime.now().strftime("%I:%M%p on %B %d, %Y")
406-
407405
modified_ts = int(
408-
dp.parse(dashboard_data.get("changed_on", now)).timestamp() * 1000
406+
dp.parse(dashboard_data.get("changed_on_utc", now)).timestamp() * 1000
409407
)
410408
title = dashboard_data.get("dashboard_title", "")
411409
# note: the API does not currently supply created_by usernames due to a bug
@@ -517,9 +515,9 @@ def construct_chart_from_chart_data(self, chart_data: dict) -> ChartSnapshot:
517515
)
518516

519517
modified_actor = f"urn:li:corpuser:{self.owner_info.get((chart_data.get('changed_by') or {}).get('id', -1), 'unknown')}"
520-
518+
now = datetime.now().strftime("%I:%M%p on %B %d, %Y")
521519
modified_ts = int(
522-
dp.parse(datetime.now().strftime("%I:%M%p on %B %d, %Y")).timestamp() * 1000
520+
dp.parse(chart_data.get("changed_on_utc", now)).timestamp() * 1000
523521
)
524522
title = chart_data.get("slice_name", "")
525523

@@ -786,11 +784,9 @@ def construct_dataset_from_dataset_data(
786784
dataset_url = f"{self.config.display_uri}{dataset_response.get('result', {}).get('url', '')}"
787785

788786
modified_actor = f"urn:li:corpuser:{self.owner_info.get((dataset_data.get('changed_by') or {}).get('id', -1), 'unknown')}"
789-
790787
now = datetime.now().strftime("%I:%M%p on %B %d, %Y")
791-
792788
modified_ts = int(
793-
dp.parse(dataset_data.get("changed_on", now)).timestamp() * 1000
789+
dp.parse(dataset_data.get("changed_on_utc", now)).timestamp() * 1000
794790
)
795791
last_modified = AuditStampClass(time=modified_ts, actor=modified_actor)
796792

0 commit comments

Comments
 (0)