Allow skipping apps in event monitoring generator

Also skip ads_backend because its dataset is restricted.
This commit is contained in:
Arkadiusz Komarzewski 2024-09-12 17:50:07 +02:00
Родитель acbbe849ae
Коммит c53af44abd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 519D6B58C3D95D09
2 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -304,6 +304,8 @@ generate:
- accounts_frontend
- accounts_backend
events_monitoring:
skip_apps:
- ads_backend # restricted dataset, we don't want to include it aggregate view
skip_pings:
- topsites-impression # access denied
- serp-categorization # access denied

Просмотреть файл

@ -1,6 +1,8 @@
"""Generate Materialized Views and aggregate queries for event monitoring."""
import os
import re
from collections import namedtuple, OrderedDict
from datetime import datetime
from pathlib import Path
@ -73,8 +75,19 @@ class EventMonitoringLive(GleanTable):
use_cloud_function=True,
app_info=[],
parallelism=8,
id_token=None
id_token=None,
):
# Get the app ID from the baseline_table name.
# This is what `common.py` also does.
app_id = re.sub(r"_stable\..+", "", baseline_table)
app_id = ".".join(app_id.split(".")[1:])
# Skip any not-allowed app.
if app_id in ConfigLoader.get(
"generate", "glean_usage", "events_monitoring", "skip_apps", fallback=[]
):
return
tables = table_names_from_baseline(baseline_table, include_project_id=False)
init_filename = f"{self.target_table_id}.materialized_view.sql"