mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-16 03:18:45 +00:00
feat(ingest/tableau): support dashboard tags (#6185)
This commit is contained in:
parent
c0d42deab7
commit
c7cc0af6ae
@ -1099,9 +1099,7 @@ class TableauSource(StatefulIngestionSourceBase):
|
|||||||
# Tags
|
# Tags
|
||||||
tag_list = sheet.get("tags", [])
|
tag_list = sheet.get("tags", [])
|
||||||
if tag_list and self.config.ingest_tags:
|
if tag_list and self.config.ingest_tags:
|
||||||
tag_list_str = [
|
tag_list_str = [t.get("name", "") for t in tag_list if t is not None]
|
||||||
t.get("name", "").upper() for t in tag_list if t is not None
|
|
||||||
]
|
|
||||||
chart_snapshot.aspects.append(
|
chart_snapshot.aspects.append(
|
||||||
builder.make_global_tag_aspect_with_tag_list(tag_list_str)
|
builder.make_global_tag_aspect_with_tag_list(tag_list_str)
|
||||||
)
|
)
|
||||||
@ -1140,7 +1138,7 @@ class TableauSource(StatefulIngestionSourceBase):
|
|||||||
|
|
||||||
tag_list = workbook.get("tags", [])
|
tag_list = workbook.get("tags", [])
|
||||||
tag_list_str = (
|
tag_list_str = (
|
||||||
[t.get("name", "").upper() for t in tag_list if t is not None]
|
[t.get("name", "") for t in tag_list if t is not None]
|
||||||
if (tag_list and self.config.ingest_tags)
|
if (tag_list and self.config.ingest_tags)
|
||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
@ -1246,6 +1244,13 @@ class TableauSource(StatefulIngestionSourceBase):
|
|||||||
)
|
)
|
||||||
dashboard_snapshot.aspects.append(dashboard_info_class)
|
dashboard_snapshot.aspects.append(dashboard_info_class)
|
||||||
|
|
||||||
|
tag_list = dashboard.get("tags", [])
|
||||||
|
if tag_list and self.config.ingest_tags:
|
||||||
|
tag_list_str = [t.get("name", "") for t in tag_list if t is not None]
|
||||||
|
dashboard_snapshot.aspects.append(
|
||||||
|
builder.make_global_tag_aspect_with_tag_list(tag_list_str)
|
||||||
|
)
|
||||||
|
|
||||||
if self.config.extract_usage_stats:
|
if self.config.extract_usage_stats:
|
||||||
# dashboard_snapshot doesn't support the stat aspect as list element and hence need to emit MetadataWorkUnit
|
# dashboard_snapshot doesn't support the stat aspect as list element and hence need to emit MetadataWorkUnit
|
||||||
wu = self._get_dashboard_stat_wu(dashboard, dashboard_urn)
|
wu = self._get_dashboard_stat_wu(dashboard, dashboard_urn)
|
||||||
|
@ -127,6 +127,9 @@ workbook_graphql_query = """
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
|
tags {
|
||||||
|
name
|
||||||
|
}
|
||||||
}
|
}
|
||||||
embeddedDatasources {
|
embeddedDatasources {
|
||||||
id
|
id
|
||||||
|
@ -597,7 +597,7 @@
|
|||||||
"changeType": "UPSERT",
|
"changeType": "UPSERT",
|
||||||
"aspectName": "globalTags",
|
"aspectName": "globalTags",
|
||||||
"aspect": {
|
"aspect": {
|
||||||
"value": "{\"tags\": [{\"tag\": \"urn:li:tag:TAGSHEET3\"}]}",
|
"value": "{\"tags\": [{\"tag\": \"urn:li:tag:TagSheet3\"}]}",
|
||||||
"contentType": "application/json"
|
"contentType": "application/json"
|
||||||
},
|
},
|
||||||
"systemMetadata": {
|
"systemMetadata": {
|
||||||
@ -817,7 +817,7 @@
|
|||||||
"com.linkedin.pegasus2avro.common.GlobalTags": {
|
"com.linkedin.pegasus2avro.common.GlobalTags": {
|
||||||
"tags": [
|
"tags": [
|
||||||
{
|
{
|
||||||
"tag": "urn:li:tag:TAGSHEET3"
|
"tag": "urn:li:tag:TagSheet3"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user