Skip to content

Commit 793eec0

Browse files
committed
chart and dataset changed_on
1 parent 678d7bd commit 793eec0

File tree

1 file changed

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

1 file changed

+8
-2
lines changed

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,11 @@ def construct_chart_from_chart_data(self, chart_data: dict) -> ChartSnapshot:
517517
)
518518

519519
modified_actor = f"urn:li:corpuser:{self.owner_info.get((chart_data.get('changed_by') or {}).get('id', -1), 'unknown')}"
520+
521+
now = datetime.now().strftime("%I:%M%p on %B %d, %Y")
522+
520523
modified_ts = int(
521-
dp.parse(chart_data.get("changed_on_utc", "now")).timestamp() * 1000
524+
dp.parse(chart_data.get("changed_on", now)).timestamp() * 1000
522525
)
523526
title = chart_data.get("slice_name", "")
524527

@@ -785,8 +788,11 @@ def construct_dataset_from_dataset_data(
785788
dataset_url = f"{self.config.display_uri}{dataset_response.get('result', {}).get('url', '')}"
786789

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

0 commit comments

Comments
 (0)