Skip to content

Commit

Permalink
fix(ingest): looker - extract usage for dashboards allowed by pattern (
Browse files Browse the repository at this point in the history
  • Loading branch information
mayurinehate authored Jul 18, 2022
1 parent 238fca5 commit 65a308a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion metadata-ingestion/src/datahub/ingestion/source/looker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,11 +1025,17 @@ def extract_usage_history_from_system_activity(
self, dashboard_ids: List[str]
) -> Iterable[MetadataChangeProposalWrapper]:

dashboard_ids_allowed = [
dashboard_id
for dashboard_id in dashboard_ids
if self.source_config.dashboard_pattern.allowed(dashboard_id)
]

# key tuple (dashboard_id, date)
dashboard_usages: Dict[tuple, DashboardUsageStatisticsClass] = dict()

common_filters = {
"history.dashboard_id": ",".join(dashboard_ids),
"history.dashboard_id": ",".join(dashboard_ids_allowed),
"history.created_date": self.source_config.extract_usage_history_for_interval,
}
for query in usage_queries.values():
Expand Down

0 comments on commit 65a308a

Please sign in to comment.