feat: include is_daily_user filter to ensure only new profiles are included (#6042)

* feat: include is_daily_user filter to ensure only new profiles are included and use submission_date as first_seen_date so that the downstream query date filter works correctly and limits processing

* feat: additional guard clause to include only new_profile true rows where submission_date = first_seen_date
This commit is contained in:
kik-kik 2024-09-05 17:48:48 +02:00 коммит произвёл GitHub
Родитель 2a5b8323b6
Коммит 1570bf1682
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 3 добавлений и 1 удалений

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

@ -4,7 +4,7 @@ CREATE OR REPLACE VIEW
AS
SELECT
client_id,
first_seen_date,
active_users.submission_date AS first_seen_date,
normalized_channel,
app_name,
app_display_version AS app_version,
@ -32,3 +32,5 @@ LEFT JOIN
WHERE
active_users.submission_date < CURRENT_DATE
AND is_new_profile
AND is_daily_user
AND active_users.submission_date = active_users.first_seen_date