mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-07 05:53:46 +00:00
MINOR: Fix pydantic v2 issues with domo (#17507)
* Fix pydantic v2 issues with domo * Fix sourceURL for domo charts
This commit is contained in:
parent
c055620ff4
commit
ac6b192fb3
@ -126,7 +126,7 @@ class DomoClient:
|
|||||||
|
|
||||||
if isinstance(response, list) and len(response) > 0:
|
if isinstance(response, list) and len(response) > 0:
|
||||||
return DomoChartDetails(
|
return DomoChartDetails(
|
||||||
id=response[0]["id"],
|
id=str(response[0]["id"]),
|
||||||
name=response[0]["title"],
|
name=response[0]["title"],
|
||||||
metadata=DomoChartMetadataDetails(
|
metadata=DomoChartMetadataDetails(
|
||||||
chartType=response[0].get("metadata", {}).get("chartType", "")
|
chartType=response[0].get("metadata", {}).get("chartType", "")
|
||||||
|
|||||||
@ -185,7 +185,7 @@ class DomodashboardSource(DashboardServiceSource):
|
|||||||
pages = self.client.domo.page_get(page_id)
|
pages = self.client.domo.page_get(page_id)
|
||||||
return DomoDashboardDetails(
|
return DomoDashboardDetails(
|
||||||
name=pages["name"],
|
name=pages["name"],
|
||||||
id=pages["id"],
|
id=str(pages["id"]),
|
||||||
cardIds=pages.get("cardIds", []),
|
cardIds=pages.get("cardIds", []),
|
||||||
description=pages.get("description", ""),
|
description=pages.get("description", ""),
|
||||||
collectionIds=pages.get("collectionIds", []),
|
collectionIds=pages.get("collectionIds", []),
|
||||||
@ -217,7 +217,7 @@ class DomodashboardSource(DashboardServiceSource):
|
|||||||
try:
|
try:
|
||||||
chart = self.client.custom.get_chart_details(page_id=chart_id)
|
chart = self.client.custom.get_chart_details(page_id=chart_id)
|
||||||
chart_url = (
|
chart_url = (
|
||||||
f"{self.service_connection.instanceDomain}/page/"
|
f"{self.service_connection.instanceDomain}page/"
|
||||||
f"{dashboard_details.id}/kpis/details/{chart_id}"
|
f"{dashboard_details.id}/kpis/details/{chart_id}"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -227,7 +227,7 @@ class DomodashboardSource(DashboardServiceSource):
|
|||||||
if chart.name:
|
if chart.name:
|
||||||
yield Either(
|
yield Either(
|
||||||
right=CreateChartRequest(
|
right=CreateChartRequest(
|
||||||
name=EntityName(chart_id),
|
name=EntityName(str(chart_id)),
|
||||||
description=Markdown(chart.description)
|
description=Markdown(chart.description)
|
||||||
if chart.description
|
if chart.description
|
||||||
else None,
|
else None,
|
||||||
|
|||||||
@ -89,7 +89,7 @@ class DomopipelineSource(PipelineServiceSource):
|
|||||||
self, pipeline_details
|
self, pipeline_details
|
||||||
) -> Iterable[Either[CreatePipelineRequest]]:
|
) -> Iterable[Either[CreatePipelineRequest]]:
|
||||||
try:
|
try:
|
||||||
pipeline_name = pipeline_details["id"]
|
pipeline_name = str(pipeline_details["id"])
|
||||||
source_url = self.get_source_url(pipeline_id=pipeline_name)
|
source_url = self.get_source_url(pipeline_id=pipeline_name)
|
||||||
task = Task(
|
task = Task(
|
||||||
name=pipeline_name,
|
name=pipeline_name,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user