From dfa1208d8167ed71c8cf5d5c7121fac50be997da Mon Sep 17 00:00:00 2001 From: Frank Bertsch Date: Wed, 24 Jan 2024 14:41:59 -0500 Subject: [PATCH] Add android_state_v2 to view (#4876) * Add android_state_v2 to view * Add new state function to client_ltv view --- .../fenix/client_ltv/view.sql | 15 +++++++++++++++ .../fenix/ltv_states/view.sql | 12 ++++++++++++ 2 files changed, 27 insertions(+) diff --git a/sql/moz-fx-data-shared-prod/fenix/client_ltv/view.sql b/sql/moz-fx-data-shared-prod/fenix/client_ltv/view.sql index 610a98c631..3dacbafe51 100644 --- a/sql/moz-fx-data-shared-prod/fenix/client_ltv/view.sql +++ b/sql/moz-fx-data-shared-prod/fenix/client_ltv/view.sql @@ -35,6 +35,21 @@ with_states AS ( ) AS state, 'android_states_v1' AS state_function ), + STRUCT( + mozfun.ltv.android_states_v2( + adjust_network, + days_since_first_seen, + days_since_seen, + {{ death_time }}, + as_of_date, + first_seen_date, + activity_pattern, + active_on_this_date, + {{ max_weeks }}, + first_reported_country + ) AS state, + 'android_states_v2' AS state_function + ), STRUCT( mozfun.ltv.android_states_with_paid_v1( adjust_network, diff --git a/sql/moz-fx-data-shared-prod/fenix/ltv_states/view.sql b/sql/moz-fx-data-shared-prod/fenix/ltv_states/view.sql index b9855891a1..2ae78811c7 100644 --- a/sql/moz-fx-data-shared-prod/fenix/ltv_states/view.sql +++ b/sql/moz-fx-data-shared-prod/fenix/ltv_states/view.sql @@ -29,6 +29,18 @@ SELECT {{ max_weeks }}, first_reported_country ) AS android_states_v1, + mozfun.ltv.android_states_v2( + adjust_network, + days_since_first_seen, + days_since_seen, + {{ death_time }}, + submission_date, + first_seen_date, + activity_pattern, + active_on_this_date, + {{ max_weeks }}, + first_reported_country + ) AS android_states_v2, mozfun.ltv.android_states_with_paid_v1( adjust_network, days_since_first_seen,