Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
llance committed Jan 13, 2025
1 parent 25161fc commit 2d089aa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion metadata-ingestion/src/datahub/ingestion/source/superset.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,11 @@ def construct_dataset_from_dataset_data(
datasource_urn = self.get_datasource_urn_from_id(
dataset_response, self.platform
)

modified_ts = int(
dp.parse(dataset_data.get("changed_on_utc", "now")).timestamp() * 1000
)
modified_actor = f"urn:li:corpuser:{(dataset_data.get('changed_by') or {}).get('username', 'unknown')}"
last_modified = AuditStampClass(time=modified_ts, actor=modified_actor)
dataset_url = f"{self.config.display_uri}{dataset.explore_url or ''}"

dataset_info = DatasetPropertiesClass(
Expand Down Expand Up @@ -770,6 +774,13 @@ def construct_dataset_from_dataset_data(
],
)
aspects_items.append(owners_info)

metrics = dataset_response.get("result", {}).get("metrics", [])

if metrics:
glossary_terms = self.parse_glossary_terms_from_metrics(metrics, last_modified)
aspects_items.append(glossary_terms)

dataset_snapshot = DatasetSnapshot(
urn=datasource_urn,
aspects=aspects_items,
Expand Down

0 comments on commit 2d089aa

Please sign in to comment.