Skip to content

Commit

Permalink
feat(ingest): lookml - add unreachable views to report (datahub-proje…
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored and szalai1 committed Dec 22, 2022
1 parent 10af1db commit 7c6aaa8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ class LookMLSourceReport(StaleEntityRemovalSourceReport):
models_dropped: List[str] = dataclass_field(default_factory=LossyList)
views_discovered: int = 0
views_dropped: List[str] = dataclass_field(default_factory=LossyList)
views_dropped_unreachable: List[str] = dataclass_field(default_factory=LossyList)
query_parse_attempts: int = 0
query_parse_failures: int = 0
query_parse_failure_views: List[str] = dataclass_field(default_factory=LossyList)
Expand All @@ -319,6 +320,9 @@ def report_models_dropped(self, model: str) -> None:
def report_views_dropped(self, view: str) -> None:
self.views_dropped.append(view)

def report_unreachable_view_dropped(self, view: str) -> None:
self.views_dropped_unreachable.append(view)

def compute_stats(self) -> None:
if self._looker_api:
self.api_stats = self._looker_api.compute_stats()
Expand Down Expand Up @@ -1642,6 +1646,9 @@ def get_internal_workunits(self) -> Iterable[MetadataWorkUnit]: # noqa: C901
logger.debug(
f"view {raw_view['name']} is not reachable from an explore, skipping.."
)
self.reporter.report_unreachable_view_dropped(
raw_view["name"]
)
continue

self.reporter.report_views_scanned()
Expand Down

0 comments on commit 7c6aaa8

Please sign in to comment.