Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mobile search deletion source to shredder #6431

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions bigquery_etl/shredder/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,23 @@ def fields(self) -> tuple[str, ...]:
"mozilla_lockbox",
)
)
MOBILE_SEARCH_SOURCES = (
tuple(
DeleteSource(
table=f"{app_name}.deletion_request",
field=GLEAN_CLIENT_ID,
)
for app_name in (
"fenix",
"firefox_ios",
"focus_android",
"focus_ios",
"klar_android",
"klar_ios",
)
)
+ LEGACY_MOBILE_SOURCES
)
USER_CHARACTERISTICS_SRC = DeleteSource(
table="firefox_desktop_stable.deletion_request_v1",
field=USER_CHARACTERISTICS_ID,
Expand All @@ -161,7 +178,7 @@ def fields(self) -> tuple[str, ...]:
)

LEGACY_MOBILE_IDS = tuple(CLIENT_ID for _ in LEGACY_MOBILE_SOURCES)

MOBILE_SEARCH_IDS = tuple(CLIENT_ID for _ in MOBILE_SEARCH_SOURCES)

client_id_target = partial(DeleteTarget, field=CLIENT_ID)
glean_target = partial(DeleteTarget, field=GLEAN_CLIENT_ID)
Expand All @@ -175,10 +192,11 @@ def fields(self) -> tuple[str, ...]:
client_id_target(table="search_derived.acer_cohort_v1"): DESKTOP_SRC,
client_id_target(
table="search_derived.mobile_search_clients_daily_v1"
): DESKTOP_SRC,
client_id_target(
table="search_derived.mobile_search_clients_daily_v2"
): DESKTOP_SRC,
): DESKTOP_SRC, # incorrectly set: https://mozilla-hub.atlassian.net/browse/DENG-4255
DeleteTarget(
table="search_derived.mobile_search_clients_daily_v2",
field=MOBILE_SEARCH_IDS,
): MOBILE_SEARCH_SOURCES,
client_id_target(table="search_derived.search_clients_daily_v8"): DESKTOP_SRC,
client_id_target(
table="telemetry_derived.desktop_engagement_clients_v1"
Expand Down