From 1bfbbafff6f6d4b9faf9cf969609480ea43c0174 Mon Sep 17 00:00:00 2001 From: Frank Bertsch Date: Mon, 1 Mar 2021 16:55:16 +0000 Subject: [PATCH] Add User Journey events_daily --- firefox_ios/views/baseline.view.lkml | 2 +- user_journey/.gitkeep | 0 user_journey/views/.gitkeep | 0 user_journey/views/events_daily.view.lkml | 108 ++++++++++++++++++++++ 4 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 user_journey/.gitkeep create mode 100644 user_journey/views/.gitkeep create mode 100644 user_journey/views/events_daily.view.lkml diff --git a/firefox_ios/views/baseline.view.lkml b/firefox_ios/views/baseline.view.lkml index 795788190..646ac2a44 100644 --- a/firefox_ios/views/baseline.view.lkml +++ b/firefox_ios/views/baseline.view.lkml @@ -1,5 +1,5 @@ view: baseline { - sql_table_name: `moz-fx-data-shared-prod.org_mozilla_ios_firefox.baseline` + sql_table_name: `moz-fx-data-shared-prod.org_mozilla_ios_firefox{% parameter channel %}.baseline` ;; dimension: additional_properties { diff --git a/user_journey/.gitkeep b/user_journey/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/user_journey/views/.gitkeep b/user_journey/views/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/user_journey/views/events_daily.view.lkml b/user_journey/views/events_daily.view.lkml new file mode 100644 index 000000000..0b0101720 --- /dev/null +++ b/user_journey/views/events_daily.view.lkml @@ -0,0 +1,108 @@ +# Un-hide and use this explore, or copy the joins into another explore, to get all the fully nested relationships from this view +explore: events_daily { + hidden: yes + + join: events_daily__experiments { + view_label: "Events Daily: Experiments" + sql: LEFT JOIN UNNEST(${events_daily.experiments}) as events_daily__experiments ;; + relationship: one_to_many + } +} + +view: events_daily { + sql_table_name: `mozdata.messaging_system.events_daily` + ;; + + dimension: addon_version { + type: string + sql: ${TABLE}.addon_version ;; + } + + dimension: app_version { + type: string + sql: ${TABLE}.app_version ;; + } + + dimension: city { + type: string + sql: ${TABLE}.city ;; + } + + dimension: client_id { + type: string + sql: ${TABLE}.client_id ;; + } + + dimension: country { + type: string + map_layer_name: countries + sql: ${TABLE}.country ;; + } + + dimension: events { + type: string + sql: ${TABLE}.events ;; + } + + dimension: experiments { + hidden: yes + sql: ${TABLE}.experiments ;; + } + + dimension: locale { + type: string + sql: ${TABLE}.locale ;; + } + + dimension: normalized_channel { + type: string + sql: ${TABLE}.normalized_channel ;; + } + + dimension: os { + type: string + sql: ${TABLE}.os ;; + } + + dimension: sample_id { + type: number + sql: ${TABLE}.sample_id ;; + } + + dimension: subdivision1 { + type: string + sql: ${TABLE}.subdivision1 ;; + } + + dimension_group: submission { + type: time + timeframes: [ + raw, + date, + week, + month, + quarter, + year + ] + convert_tz: no + datatype: date + sql: ${TABLE}.submission_date ;; + } + + measure: count { + type: count + drill_fields: [] + } +} + +view: events_daily__experiments { + dimension: key { + type: string + sql: ${TABLE}.key ;; + } + + dimension: value { + type: string + sql: ${TABLE}.value ;; + } +}