Skip to content

Commit

Permalink
Merge pull request #1786 from elementary-data/ele-3971-allow-exposure…
Browse files Browse the repository at this point in the history
…-logic-overwrite

Extract exposure logic
  • Loading branch information
ofek1weiss authored Jan 16, 2025
2 parents 9657b63 + b2892dd commit fb3e32d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion elementary/monitor/api/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ def _get_groups(
]
)

def _get_exposures(
self, models_api: ModelsAPI, upstream_node_ids: Optional[List[str]] = None
) -> Dict[str, NormalizedExposureSchema]:
return models_api.get_exposures(upstream_node_ids=upstream_node_ids)

def get_report_data(
self,
days_back: int = 7,
Expand Down Expand Up @@ -101,7 +106,9 @@ def get_report_data(
lineage_node_ids.extend(models.keys())
sources = models_api.get_sources()
lineage_node_ids.extend(sources.keys())
exposures = models_api.get_exposures(upstream_node_ids=lineage_node_ids)
exposures = self._get_exposures(
models_api, upstream_node_ids=lineage_node_ids
)
lineage_node_ids.extend(exposures.keys())
singular_tests = tests_api.get_singular_tests()

Expand Down

0 comments on commit fb3e32d

Please sign in to comment.