Skip to content

Commit 8d8f3db

Browse files
chore(monitor-plus-users): Created a sync table for monitor plus sync (#8429)
* chore(monitor-plus-users): Created a sync table for monitor plus sync * chore(monitor-plus-users): Created a sync table for monitor plus sync * chore(monitor-plus-users): Created a sync table for monitor plus sync) --------- Co-authored-by: Chelsey Beck <[email protected]>
1 parent 946fbc7 commit 8d8f3db

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

dags.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2528,3 +2528,25 @@ bqetl_firefox_data_cta_uid_map:
25282528
tags:
25292529
- impact/tier_2
25302530
- repo/bigquery-etl
2531+
2532+
bqetl_braze_monitor_plus_users_sync:
2533+
catchup: false
2534+
default_args:
2535+
depends_on_past: false
2536+
email:
2537+
2538+
2539+
email_on_failure: true
2540+
email_on_retry: true
2541+
end_date: null
2542+
max_active_tis_per_dag: null
2543+
2544+
retries: 2
2545+
retry_delay: 30m
2546+
start_date: '2025-11-13'
2547+
description: Create Monitor Plus Users sync table to sync to Braze.
2548+
repo: bigquery-etl
2549+
schedule_interval: once
2550+
tags:
2551+
- impact/tier_2
2552+
- repo/bigquery-etl
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
friendly_name: Monitor Plus Sync
2+
description: |-
3+
Temporary table used to sync Monitor Plus Users table to sync to Braze for a
4+
one-time send. These users will need to be deleted once the sync
5+
is successful in order to keep Braze clean
6+
owners:
7+
8+
9+
labels:
10+
incremental: false
11+
owner: sherrera
12+
scheduling:
13+
dag_name: bqetl_braze_monitor_plus_users_sync
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- Query for braze_external.monitor_plus_sync_v1
2+
-- For more information on writing queries see:
3+
-- https://docs.telemetry.mozilla.org/cookbooks/bigquery/querying.html
4+
SELECT
5+
CURRENT_TIMESTAMP() AS UPDATED_AT,
6+
CONCAT('monitor-plus_users-', SUBSTR(TO_HEX(SHA256(GENERATE_UUID())), 1, 23)) AS EXTERNAL_ID,
7+
TO_JSON(
8+
STRUCT(
9+
email AS email,
10+
"subscribed" AS email_subscribe,
11+
ARRAY_AGG(
12+
STRUCT(
13+
"87c4fd94-90a3-443c-bfb0-97d1227219aa" AS subscription_group_id,
14+
"subscribed" AS subscription_state
15+
)
16+
) AS subscription_groups
17+
)
18+
) AS PAYLOAD
19+
FROM
20+
`moz-fx-data-shared-prod.braze_external.monitor_plus_sunset_test`
21+
GROUP BY
22+
email

0 commit comments

Comments
 (0)