Skip to content

Commit

Permalink
Add startup_profile_selection_reason to clients 28 days later
Browse files Browse the repository at this point in the history
  • Loading branch information
ANich committed Oct 25, 2023
1 parent 1b006dc commit b8d9ef4
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ WITH clients_first_seen_28_days_ago AS (
attribution_experiment,
attribution_dltoken,
attribution_dlsource,
-- startup_profile_selection_reason, when startup_profile_selection_reason is available
startup_profile_selection_reason,
first_seen_date,
FROM
telemetry_derived.clients_first_seen_v2
Expand All @@ -38,24 +38,20 @@ clients_first_seen_28_days_ago_with_days_seen AS (
AND cls.submission_date = @submission_date
)
SELECT
client_id,
sample_id,
first_seen_date,
@submission_date AS submission_date,
country_code,
channel,
build_id,
os,
os_version,
distribution_id,
attribution_source,
attribution_ua,
attribution_medium,
attribution_campaign,
attribution_content,
attribution_experiment,
attribution_dltoken,
attribution_dlsource,
* REPLACE (
COALESCE(
days_seen_bits,
mozfun.bits28.from_string('0000000000000000000000000000')
) AS days_seen_bits,
COALESCE(
days_visited_1_uri_bits,
mozfun.bits28.from_string('0000000000000000000000000000')
) AS days_visited_1_uri_bits,
COALESCE(
days_interacted_bits,
mozfun.bits28.from_string('0000000000000000000000000000')
) AS days_interacted_bits
),
COALESCE(
BIT_COUNT(mozfun.bits28.from_string('1111111000000000000000000000') & days_seen_bits) >= 5,
FALSE
Expand Down Expand Up @@ -84,17 +80,6 @@ SELECT
) > 0,
FALSE
) AS qualified_week4,
COALESCE(
days_seen_bits,
mozfun.bits28.from_string('0000000000000000000000000000')
) AS days_seen_bits,
COALESCE(
days_visited_1_uri_bits,
mozfun.bits28.from_string('0000000000000000000000000000')
) AS days_visited_1_uri_bits,
COALESCE(
days_interacted_bits,
mozfun.bits28.from_string('0000000000000000000000000000')
) AS days_interacted_bits,
@submission_date AS submission_date,
FROM
clients_first_seen_28_days_ago_with_days_seen
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,7 @@ fields:
- name: days_interacted_bits
type: INTEGER
mode: NULLABLE
- name: startup_profile_selection_reason
type: STRING
mode: NULLABLE
description: Client's first startup_profile_selection reason.

0 comments on commit b8d9ef4

Please sign in to comment.