mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-24 08:19:38 +00:00
* Send usage with PUT * Wrap get details * Wrap get details
This commit is contained in:
parent
2e3b062e44
commit
9ad34f51a7
@ -40,7 +40,7 @@ class OMetaDashboardMixin:
|
|||||||
:param dashboard: Table Entity to update
|
:param dashboard: Table Entity to update
|
||||||
:param dashboard_usage_request: Usage data to add
|
:param dashboard_usage_request: Usage data to add
|
||||||
"""
|
"""
|
||||||
resp = self.client.post(
|
resp = self.client.put(
|
||||||
f"/usage/dashboard/{dashboard.id.__root__}",
|
f"/usage/dashboard/{dashboard.id.__root__}",
|
||||||
data=dashboard_usage_request.json(),
|
data=dashboard_usage_request.json(),
|
||||||
)
|
)
|
||||||
|
@ -123,7 +123,7 @@ class OMetaTableMixin:
|
|||||||
:param table: Table Entity to update
|
:param table: Table Entity to update
|
||||||
:param table_usage_request: Usage data to add
|
:param table_usage_request: Usage data to add
|
||||||
"""
|
"""
|
||||||
resp = self.client.post(
|
resp = self.client.put(
|
||||||
f"/usage/table/{table.id.__root__}", data=table_usage_request.json()
|
f"/usage/table/{table.id.__root__}", data=table_usage_request.json()
|
||||||
)
|
)
|
||||||
logger.debug("published table usage %s", resp)
|
logger.debug("published table usage %s", resp)
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
"""
|
"""
|
||||||
Base class for ingesting dashboard services
|
Base class for ingesting dashboard services
|
||||||
"""
|
"""
|
||||||
|
import traceback
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, Iterable, List, Optional
|
from typing import Any, Iterable, List, Optional
|
||||||
@ -273,7 +274,16 @@ class DashboardServiceSource(TopologyRunnerMixin, Source, ABC):
|
|||||||
|
|
||||||
def get_dashboard(self) -> Any:
|
def get_dashboard(self) -> Any:
|
||||||
for dashboard in self.get_dashboards_list():
|
for dashboard in self.get_dashboards_list():
|
||||||
|
|
||||||
|
try:
|
||||||
dashboard_details = self.get_dashboard_details(dashboard)
|
dashboard_details = self.get_dashboard_details(dashboard)
|
||||||
|
except Exception as err:
|
||||||
|
logger.error(
|
||||||
|
f"Cannot extract dashboard details from {dashboard} - {err}"
|
||||||
|
)
|
||||||
|
logger.debug(traceback.format_exc())
|
||||||
|
continue
|
||||||
|
|
||||||
if filter_by_dashboard(
|
if filter_by_dashboard(
|
||||||
self.source_config.dashboardFilterPattern,
|
self.source_config.dashboardFilterPattern,
|
||||||
self.get_dashboard_name(dashboard_details),
|
self.get_dashboard_name(dashboard_details),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user