Deng 3453 braze models unit tests (#5394)

* DENG-3453 braze models add unit tests

* fix test

* add more tests
This commit is contained in:
Leli 2024-04-19 15:16:04 +02:00 коммит произвёл GitHub
Родитель 98ee53db1f
Коммит b3ffb3adaf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
25 изменённых файлов: 689 добавлений и 45 удалений

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

@ -8,6 +8,7 @@ SELECT
create_timestamp,
update_timestamp
)
ORDER BY update_timestamp, create_timestamp, name
) AS newsletters
FROM
`moz-fx-data-shared-prod.ctms_braze.ctms_newsletters`

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

@ -11,6 +11,7 @@ SELECT
plan_interval_count,
event_timestamp AS update_timestamp
)
ORDER BY event_timestamp, plan_started_at, plan_ended_at, plan_id, product_id
) AS products
FROM
`moz-fx-data-shared-prod.subscription_platform_derived.stripe_subscriptions_v1`

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

@ -1,3 +1,24 @@
WITH unified AS (
-- Combine newsletters and waitlists into a single set of records
SELECT
external_id,
newsletter_name AS subscription_name,
IF(subscribed, 'subscribed', 'unsubscribed') AS subscription_state
FROM
`moz-fx-data-shared-prod.braze_derived.newsletters_v1`
CROSS JOIN
UNNEST(newsletters) AS newsletter
UNION ALL
SELECT
external_id,
CONCAT(waitlist_name, '-waitlist') AS subscription_name, -- Appending '-waitlist' to the name
IF(subscribed, 'subscribed', 'unsubscribed') AS subscription_state
FROM
`moz-fx-data-shared-prod.braze_derived.waitlists_v1`
CROSS JOIN
UNNEST(waitlists) AS waitlist
)
SELECT
unified.external_id AS external_id,
unified.subscription_name AS subscription_name,
@ -5,28 +26,11 @@ SELECT
map.mozilla_subscription_id AS mozilla_subscription_id,
unified.subscription_state AS subscription_state
FROM
(
-- Combine newsletters and waitlists into a single set of records
SELECT
external_id,
newsletter_name AS subscription_name,
IF(subscribed, 'subscribed', 'unsubscribed') AS subscription_state
FROM
`moz-fx-data-shared-prod.braze_derived.newsletters_v1`,
UNNEST(newsletters) AS newsletter
UNION ALL
SELECT
external_id,
CONCAT(waitlist_name, '-waitlist') AS subscription_name, -- Appending '-waitlist' to the name
IF(subscribed, 'subscribed', 'unsubscribed') AS subscription_state
FROM
`moz-fx-data-shared-prod.braze_derived.waitlists_v1`,
UNNEST(waitlists) AS waitlist
) unified
JOIN
`moz-fx-data-shared-prod.braze_derived.subscriptions_map_v1` map
unified
INNER JOIN
`moz-fx-data-shared-prod.braze_derived.subscriptions_map_v1` AS map
ON unified.subscription_name = map.braze_subscription_name
-- Ensure users are active/not suppressed
JOIN
`moz-fx-data-shared-prod.braze_derived.users_v1` users
INNER JOIN
`moz-fx-data-shared-prod.braze_derived.users_v1` AS users
ON users.external_id = unified.external_id;

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

@ -1,27 +1,27 @@
SELECT
u.external_id,
u.email,
u.mailing_country,
u.email_subscribe,
u.basket_token,
u.email_lang,
u.create_timestamp,
u.update_timestamp,
u.fxa_id_sha256,
u.fxa_primary_email,
u.fxa_lang,
u.first_service,
n.newsletters,
w.waitlists,
p.products
users.external_id,
users.email,
users.mailing_country,
users.email_subscribe,
users.basket_token,
users.email_lang,
users.create_timestamp,
users.update_timestamp,
users.fxa_id_sha256,
users.fxa_primary_email,
users.fxa_lang,
users.first_service,
newsletters.newsletters,
waitlists.waitlists,
products.products
FROM
`moz-fx-data-shared-prod.braze_derived.users_v1` u
`moz-fx-data-shared-prod.braze_derived.users_v1` AS users
LEFT JOIN
`moz-fx-data-shared-prod.braze_derived.newsletters_v1` n
ON u.external_id = n.external_id
`moz-fx-data-shared-prod.braze_derived.newsletters_v1` AS newsletters
ON users.external_id = newsletters.external_id
LEFT JOIN
`moz-fx-data-shared-prod.braze_derived.waitlists_v1` w
ON u.external_id = w.external_id
`moz-fx-data-shared-prod.braze_derived.waitlists_v1` AS waitlists
ON users.external_id = waitlists.external_id
LEFT JOIN
`moz-fx-data-shared-prod.braze_derived.products_v1` p
ON u.fxa_id_sha256 = p.fxa_id_sha256;
`moz-fx-data-shared-prod.braze_derived.products_v1` AS products
ON users.fxa_id_sha256 = products.fxa_id_sha256;

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

@ -5,12 +5,13 @@ SELECT
name AS waitlist_name,
JSON_EXTRACT_SCALAR(fields, '$.geo') AS waitlist_geo,
JSON_EXTRACT_SCALAR(fields, '$.platform') AS waitlist_platform,
SOURCE AS waitlist_source,
source AS waitlist_source,
create_timestamp,
subscribed,
unsub_reason,
update_timestamp
)
ORDER BY update_timestamp, create_timestamp, name
) AS waitlists
FROM
`moz-fx-data-shared-prod.ctms_braze.ctms_waitlists`

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

@ -0,0 +1,46 @@
# expect newsletters
---
# user 1
- external_id: email_id_1
newsletters:
- newsletter_name: newsletter_1
subscribed: true
newsletter_lang: EN
create_timestamp: 2020-01-01 10:00:00+00:00
update_timestamp: 2021-01-01 11:00:00+00:00
- newsletter_name: newsletter_2
subscribed: true
newsletter_lang: EN
create_timestamp: 2020-02-01 10:00:00+00:00
update_timestamp: 2021-02-01 11:00:00+00:00
# user 2
- external_id: email_id_2
newsletters:
- newsletter_name: newsletter_1
subscribed: false
newsletter_lang: DE
create_timestamp: 2020-01-01 10:00:00+00:00
update_timestamp: 2021-01-01 11:00:00+00:00
# user 3 with multiple entries
- external_id: email_id_3_sort_multiple_entries
newsletters:
- newsletter_name: newsletter_1
subscribed: false
newsletter_lang: DE
create_timestamp: 2020-01-01 10:00:00+00:00
update_timestamp: 2021-01-01 11:00:00+00:00
- newsletter_name: newsletter_11
subscribed: false
newsletter_lang: DE
create_timestamp: 2020-01-01 10:00:00+00:00
update_timestamp: 2021-01-01 11:00:00+00:00
- newsletter_name: newsletter_3
subscribed: false
newsletter_lang: DE
create_timestamp: 2020-01-01 10:00:01+00:00
update_timestamp: 2021-01-01 11:00:00+00:00
- newsletter_name: newsletter_2
subscribed: false
newsletter_lang: DE
create_timestamp: 2020-01-01 10:00:00+00:00
update_timestamp: 2021-01-01 11:00:01+00:00

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

@ -0,0 +1,68 @@
# ctms_newsletters
---
# user 1
- email_id: email_id_1
name: newsletter_1
subscribed: true
format: H
lang: EN
unsub_reason: "too long"
create_timestamp: 2020-01-01 10:00:00
update_timestamp: 2021-01-01 11:00:00
source: https://some.url.com
- email_id: email_id_1
name: newsletter_2
subscribed: true
format: H
lang: EN
unsub_reason: ""
create_timestamp: 2020-02-01 10:00:00
update_timestamp: 2021-02-01 11:00:00
source: https://some.url.com
# user 2
- email_id: email_id_2
name: newsletter_1
subscribed: false
format: H
lang: DE
unsub_reason: ""
create_timestamp: 2020-01-01 10:00:00
update_timestamp: 2021-01-01 11:00:00
source: https://some.url.com
# user 3 with multiple entries
- email_id: email_id_3_sort_multiple_entries
name: newsletter_1
subscribed: false
format: H
lang: DE
unsub_reason: ""
create_timestamp: 2020-01-01 10:00:00
update_timestamp: 2021-01-01 11:00:00
source: https://some.url.com
- email_id: email_id_3_sort_multiple_entries
name: newsletter_2
subscribed: false
format: H
lang: DE
unsub_reason: ""
create_timestamp: 2020-01-01 10:00:00
update_timestamp: 2021-01-01 11:00:01
source: https://some.url.com
- email_id: email_id_3_sort_multiple_entries
name: newsletter_3
subscribed: false
format: H
lang: DE
unsub_reason: ""
create_timestamp: 2020-01-01 10:00:01
update_timestamp: 2021-01-01 11:00:00
source: https://some.url.com
- email_id: email_id_3_sort_multiple_entries
name: newsletter_11
subscribed: false
format: H
lang: DE
unsub_reason: ""
create_timestamp: 2020-01-01 10:00:00
update_timestamp: 2021-01-01 11:00:00
source: https://some.url.com

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

@ -0,0 +1,40 @@
# expect braze products
---
# user 1
- fxa_id_sha256: fxa_uid_1
products:
- plan_id: plan_1
product_id: prod_1
status: active
plan_started_at: 2020-01-01 10:00:00+00:00
plan_ended_at: 2020-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 3
update_timestamp: 2020-12-01 10:00:00+00:00
- plan_id: plan_3
product_id: prod_1
status: active
plan_started_at: 2021-01-01 10:00:00+00:00
plan_ended_at: 2021-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 1
update_timestamp: 2022-12-01 10:00:00+00:00
- plan_id: plan_2
product_id: prod_2
status: active
plan_started_at: 2021-01-01 10:00:00+00:00
plan_ended_at: 2022-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 1
update_timestamp: 2022-12-01 10:00:00+00:00
# user 2
- fxa_id_sha256: fxa_uid_2
products:
- plan_id: plan_1
product_id: prod_1
status: active
plan_started_at: 2020-01-01 10:00:00+00:00
plan_ended_at: 2020-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 3
update_timestamp: 2020-12-01 10:00:00+00:00

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

@ -0,0 +1,40 @@
# stripe_subscriptions
---
# user 1
- fxa_uid: fxa_uid_1
plan_id: plan_1
product_id: prod_1
status: active
plan_started_at: 2020-01-01 10:00:00+00:00
plan_ended_at: 2020-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 3
event_timestamp: 2020-12-01 10:00:00+00:00
- fxa_uid: fxa_uid_1
plan_id: plan_2
product_id: prod_2
status: active
plan_started_at: 2021-01-01 10:00:00+00:00
plan_ended_at: 2022-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 1
event_timestamp: 2022-12-01 10:00:00+00:00
- fxa_uid: fxa_uid_1
plan_id: plan_3
product_id: prod_1
status: active
plan_started_at: 2021-01-01 10:00:00+00:00
plan_ended_at: 2021-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 1
event_timestamp: 2022-12-01 10:00:00+00:00
# user 2
- fxa_uid: fxa_uid_2
plan_id: plan_1
product_id: prod_1
status: active
plan_started_at: 2020-01-01 10:00:00+00:00
plan_ended_at: 2020-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 3
event_timestamp: 2020-12-01 10:00:00+00:00

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

@ -0,0 +1,51 @@
# expect braze subscriptions
---
# user 1
- external_id: user_1
subscription_name: newsletter_1
firefox_subscription_id: firefox_newsletter_1
mozilla_subscription_id: mozilla_newsletter_1
subscription_state: subscribed
- external_id: user_1
subscription_name: newsletter_2
firefox_subscription_id: firefox_newsletter_2
mozilla_subscription_id: mozilla_newsletter_2
subscription_state: subscribed
- external_id: user_1
subscription_name: newsletter_3
firefox_subscription_id: firefox_newsletter_3
mozilla_subscription_id: mozilla_newsletter_3
subscription_state: unsubscribed
- external_id: user_1
subscription_name: newsletter_4
firefox_subscription_id: firefox_newsletter_4
mozilla_subscription_id: mozilla_newsletter_4
subscription_state: unsubscribed
- external_id: user_1
subscription_name: waitlist_1-waitlist
firefox_subscription_id: firefox_waitlist_1
mozilla_subscription_id: mozilla_waitlist_1
subscription_state: subscribed
# user 2
- external_id: user_2
subscription_name: newsletter_1
firefox_subscription_id: firefox_newsletter_1
mozilla_subscription_id: mozilla_newsletter_1
subscription_state: subscribed
- external_id: user_2
subscription_name: waitlist_1-waitlist
firefox_subscription_id: firefox_waitlist_1
mozilla_subscription_id: mozilla_waitlist_1
subscription_state: subscribed
# user 3
- external_id: user_3
subscription_name: newsletter_1
firefox_subscription_id: firefox_newsletter_1
mozilla_subscription_id: mozilla_newsletter_1
subscription_state: subscribed
- external_id: user_3
subscription_name: waitlist_2-waitlist
firefox_subscription_id: firefox_waitlist_2
mozilla_subscription_id: mozilla_waitlist_2
subscription_state: subscribed
# user 4 not in braze_users

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

@ -0,0 +1,30 @@
# braze subscriptions
---
# user 1
- external_id: user_1
newsletters:
- newsletter_name: newsletter_1
subscribed: true
- newsletter_name: newsletter_2
subscribed: true
- newsletter_name: newsletter_3
subscribed: false
- newsletter_name: newsletter_4
subscribed: false
# user 2
- external_id: user_2
newsletters:
- newsletter_name: newsletter_1
subscribed: true
# user 3
- external_id: user_3
newsletters:
- newsletter_name: newsletter_1
subscribed: true
- newsletter_name: not_a_newsletter
subscribed: true
# user 4 not in braze_users
- external_id: not_a_user
newsletters:
- newsletter_name: newsletter_1
subscribed: true

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

@ -0,0 +1,26 @@
# braze subscription map
---
- braze_subscription_name: newsletter_1
firefox_subscription_id: firefox_newsletter_1
mozilla_subscription_id: mozilla_newsletter_1
- braze_subscription_name: newsletter_2
firefox_subscription_id: firefox_newsletter_2
mozilla_subscription_id: mozilla_newsletter_2
- braze_subscription_name: newsletter_3
firefox_subscription_id: firefox_newsletter_3
mozilla_subscription_id: mozilla_newsletter_3
- braze_subscription_name: newsletter_4
firefox_subscription_id: firefox_newsletter_4
mozilla_subscription_id: mozilla_newsletter_4
- braze_subscription_name: waitlist_1-waitlist
firefox_subscription_id: firefox_waitlist_1
mozilla_subscription_id: mozilla_waitlist_1
- braze_subscription_name: waitlist_2-waitlist
firefox_subscription_id: firefox_waitlist_2
mozilla_subscription_id: mozilla_waitlist_2
- braze_subscription_name: waitlist_3-waitlist
firefox_subscription_id: firefox_waitlist_3
mozilla_subscription_id: mozilla_waitlist_3
- braze_subscription_name: waitlist_4-waitlist
firefox_subscription_id: firefox_waitlist_4
mozilla_subscription_id: mozilla_waitlist_4

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

@ -0,0 +1,9 @@
# braze users
---
# user 1
- external_id: user_1
# user 2
- external_id: user_2
# user 3
- external_id: user_3
# user 4 not in braze_users

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

@ -0,0 +1,24 @@
# braze waitlists
---
# user 1
- external_id: user_1
waitlists:
- waitlist_name: waitlist_1
subscribed: true
# user 2
- external_id: user_2
waitlists:
- waitlist_name: waitlist_1
subscribed: true
# user 3
- external_id: user_3
waitlists:
- waitlist_name: waitlist_2
subscribed: true
- waitlist_name: not_a_waitlist
subscribed: true
# user 4 not in braze_users
- external_id: not_a_user
waitlists:
- waitlist_name: waitlist_1
subscribed: true

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

@ -0,0 +1,20 @@
# expect braze suppression
---
# user 1
- email: user_1@mail.com
email_id: user_1
# user 2.0
- email: user_2@mail.com
email_id: user_2
# user 2.1 with different id - should show up
- email: user_2@mail.com
email_id: user_2_with_different_id
# user 2.2 with different email - should show up
- email: user_2_second_mail@mail.com
email_id: user_2
# user 3
- email: user_3@mail.com
email_id: user_3
# user 4
- email: user_4@mail.com
email_id: user_on_suppression_list_but_not_opted_out

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

@ -0,0 +1,15 @@
# acoustic contacts
---
# user 1 - coming from acoustic
- email: user_1@mail.com
email_id: user_1
has_opted_out_of_email: 1
# user 4 - on the suppression list but not opted out of emails in Acoustic or CTMS
- email: user_4@mail.com
email_id: user_on_suppression_list_but_not_opted_out
has_opted_out_of_email: 0
# user 5 - not on the suppression list and not opted out of emails in Acoustic or CTMS
# should not show up on suppressions.
- email: user_5@mail.com
email_id: user_not_on_suppression_list_not_opted_out
has_opted_out_of_email: 0

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

@ -0,0 +1,14 @@
# acoustic suppression
---
# user 2.0
- email: user_2@mail.com
external_id: user_2
# user 2.1 with different id - should show up
- email: user_2@mail.com
external_id: user_2_with_different_id
# user 2.2 with different email - should show up
- email: user_2_second_mail@mail.com
external_id: user_2
# user 4 - on the suppression list but not opted out of emails in Acoustic or CTMS
- email: user_4@mail.com
external_id: user_on_suppression_list_but_not_opted_out

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

@ -0,0 +1,15 @@
# ctms_emails
---
# user 3
- primary_email: user_3@mail.com
email_id: user_3
has_opted_out_of_email: true
# user 4 - on the suppression list but not opted out of emails in Acoustic or CTMS
- email: user_4@mail.com
email_id: user_on_suppression_list_but_not_opted_out
has_opted_out_of_email: false
# user 5 - not on the suppression list and not opted out of emails in Acoustic or CTMS
# should not show up on suppressions.
- email: user_5@mail.com
email_id: user_not_on_suppression_list_not_opted_out
has_opted_out_of_email: false

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

@ -0,0 +1,63 @@
# expect braze user profiles
---
# user 1
- external_id: user_1
email: user_1@mail.com
mailing_country: country_1
email_subscribe: subscribed
basket_token: token_1
email_lang: EN
create_timestamp: 2020-01-01 10:00:00+00:00
update_timestamp: 2021-01-01 14:00:00+00:00
fxa_id_sha256: fxa_user_1
fxa_primary_email: user_1_primary@mail.com
fxa_lang: DE
first_service: service_1
newsletters:
- newsletter_name: newsletter_1
newsletter_lang: EN
- newsletter_name: newsletter_2
newsletter_lang: DE
waitlists:
- waitlist_name: waitlist_1
subscribed: true
products:
- plan_id: 1
plan_name: plan_1
product_id: prod_1
status: active
plan_started_at: 2020-01-01 10:00:00+00:00
plan_ended_at: 2020-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 3
update_timestamp: 2020-12-01 10:00:00+00:00
# user 2
- external_id: user_2_only_newsletters
email: user_2@mail.com
mailing_country: country_1
email_subscribe: subscribed
basket_token: token_1
email_lang: EN
create_timestamp: 2020-01-01 10:00:00+00:00
update_timestamp: 2021-01-01 14:00:00+00:00
newsletters:
- newsletter_name: newsletter_1
newsletter_lang: EN
waitlists: []
products: []
# user 3
- external_id: user_3_only_waitlist
newsletters: []
waitlists:
- waitlist_name: waitlist_1
subscribed: true
products: []
# user 4
- external_id: user_4_only_products
fxa_id_sha256: fxa_user_4
newsletters: []
waitlists: []
products:
- plan_id: 1
plan_name: plan_1
# user 5 not in user list - should not show up

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

@ -0,0 +1,21 @@
# braze newsletters
---
# user 1
- external_id: user_1
newsletters:
- newsletter_name: newsletter_1
newsletter_lang: EN
- newsletter_name: newsletter_2
newsletter_lang: DE
# user 2
- external_id: user_2_only_newsletters
newsletters:
- newsletter_name: newsletter_1
newsletter_lang: EN
# user 3
# user 4
# user 5 not in user list - should not show up
- external_id: user_5_not_in_users
newsletters:
- newsletter_name: newsletter_1
newsletter_lang: EN

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

@ -0,0 +1,22 @@
# braze products
---
# user 1
- fxa_id_sha256: fxa_user_1
products:
- plan_id: 1
plan_name: plan_1
product_id: prod_1
status: active
plan_started_at: 2020-01-01 10:00:00+00:00
plan_ended_at: 2020-12-31 10:00:00+00:00
plan_interval: month
plan_interval_count: 3
update_timestamp: 2020-12-01 10:00:00+00:00
# user 2
# user 3
# user 4
- fxa_id_sha256: fxa_user_4
products:
- plan_id: 1
plan_name: plan_1
# user 5 not in user list - should not show up

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

@ -0,0 +1,30 @@
# braze users
---
# user 1
- external_id: user_1
email: user_1@mail.com
mailing_country: country_1
email_subscribe: subscribed
basket_token: token_1
email_lang: EN
create_timestamp: 2020-01-01 10:00:00+00:00
update_timestamp: 2021-01-01 14:00:00+00:00
fxa_id_sha256: fxa_user_1
fxa_primary_email: user_1_primary@mail.com
fxa_lang: DE
first_service: service_1
# user 2
- external_id: user_2_only_newsletters
email: user_2@mail.com
mailing_country: country_1
email_subscribe: subscribed
basket_token: token_1
email_lang: EN
create_timestamp: 2020-01-01 10:00:00+00:00
update_timestamp: 2021-01-01 14:00:00+00:00
# user 3
- external_id: user_3_only_waitlist
# user 4
- external_id: user_4_only_products
fxa_id_sha256: fxa_user_4
# user 5 not in user list - should not show up

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

@ -0,0 +1,15 @@
# braze waitlists
---
# user 1
- external_id: user_1
waitlists:
- waitlist_name: waitlist_1
subscribed: true
# user 2
# user 3
- external_id: user_3_only_waitlist
waitlists:
- waitlist_name: waitlist_1
subscribed: true
# user 4
# user 5 not in user list - should not show up

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

@ -0,0 +1,40 @@
# expect for braze waitlists
---
# user 1
- external_id: user_1
waitlists:
- waitlist_name: waitlist_1
waitlist_geo: DE
waitlist_platform: platform_1
waitlist_source: source_1
create_timestamp: 2020-01-01 10:00:00+00:00
subscribed: true
unsub_reason: because
update_timestamp: 2021-01-01 13:00:00+00:00
- waitlist_name: waitlist_2
waitlist_geo: DE
waitlist_platform: platform_2
waitlist_source: source_2
create_timestamp: 2020-01-01 10:00:00+00:00
subscribed: true
unsub_reason: for reasons
update_timestamp: 2021-01-01 13:00:00+00:00
# user 2 unsubscribed from two waitlists
- external_id: user_2
waitlists:
- waitlist_name: waitlist_2
waitlist_geo: EN
waitlist_platform: platform_2
waitlist_source: source_2
create_timestamp: 2020-01-01 10:00:00+00:00
subscribed: false
unsub_reason: because
update_timestamp: 2021-01-01 13:00:00+00:00
- waitlist_name: waitlist_3
waitlist_geo: EN
waitlist_platform: platform_3
waitlist_source: source_3
create_timestamp: 2020-01-02 10:00:00+00:00
subscribed: false
unsub_reason: because
update_timestamp: 2021-01-01 13:00:00+00:00

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

@ -0,0 +1,48 @@
# waitlists
---
# user 1
- email_id: user_1
name: waitlist_1
fields: '{
"geo": "DE",
"platform": "platform_1"
}'
source: source_1
create_timestamp: 2020-01-01 10:00:00+00:00
subscribed: true
unsub_reason: because
update_timestamp: 2021-01-01 13:00:00+00:00
- email_id: user_1
name: waitlist_2
fields: '{
"geo": "DE",
"platform": "platform_2"
}'
source: source_2
create_timestamp: 2020-01-01 10:00:00+00:00
subscribed: true
unsub_reason: for reasons
update_timestamp: 2021-01-01 13:00:00+00:00
# user 2 unsubscribed from two waitlists
- email_id: user_2
name: waitlist_2
fields: '{
"geo": "EN",
"platform": "platform_2"
}'
source: source_2
create_timestamp: 2020-01-01 10:00:00+00:00
subscribed: false
unsub_reason: because
update_timestamp: 2021-01-01 13:00:00+00:00
- email_id: user_2
name: waitlist_3
fields: '{
"geo": "EN",
"platform": "platform_3"
}'
source: source_3
create_timestamp: 2020-01-02 10:00:00+00:00
subscribed: false
unsub_reason: because
update_timestamp: 2021-01-01 13:00:00+00:00