Skip to content

Commit cb72205

Browse files
committed
more instances of now
1 parent 379ed6f commit cb72205

File tree

1 file changed

+6
-2
lines changed
  • metadata-ingestion/src/datahub/ingestion/source

1 file changed

+6
-2
lines changed

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,10 @@ 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+
405+
now = datetime.now().strftime("%I:%M%p on %B %d, %Y")
404406
modified_ts = int(
405-
dp.parse(dashboard_data.get("changed_on_utc", "now")).timestamp() * 1000
407+
dp.parse(dashboard_data.get("changed_on_utc", now)).timestamp() * 1000
406408
)
407409
title = dashboard_data.get("dashboard_title", "")
408410
# note: the API does not currently supply created_by usernames due to a bug
@@ -514,8 +516,10 @@ def construct_chart_from_chart_data(self, chart_data: dict) -> ChartSnapshot:
514516
)
515517

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

0 commit comments

Comments
 (0)