-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathq_user_action.view.lkml
executable file
·116 lines (104 loc) · 3.24 KB
/
q_user_action.view.lkml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
view: q_user_action {
# Qubit LookML | Retail | V2
derived_table: {
sql: SELECT
qp_bi_view_name,
ts,
property_event_ts,
view_id,
meta_recordDate,
meta_trackingId,
context_id,
context_viewNumber,
context_sessionNumber,
meta_serverTs,
meta_ts,
user_action.meta_type AS meta_type,
user_action.type AS type,
user_action.name AS name,
user_action.user_interaction_type AS user_interaction_type,
user_action.voucher_id AS voucher_id,
user_action.voucher_label AS voucher_label,
user_action.voucher_entry AS voucher_entry,
user_action.voucher_entrySuccess AS voucher_entrySuccess
FROM
`qubit-client-{{q_view_v01.project._parameter_value}}.{{q_view_v01.site._parameter_value}}__v2.livetap_user_action`
LEFT JOIN
unnest (user_action) as user_action
WHERE
{% condition q_view_v01.time_data_points_date %} property_event_ts {% endcondition %}
;;
}
dimension: view_id {
type: string
sql: ${TABLE}.view_id ;;
hidden: yes
primary_key: yes
}
dimension: context_session_number {
type: number
sql: ${TABLE}.context_sessionNumber ;;
label: "Session Number"
group_label: "View Meta Data"
description: "Session number of the visitor, in a lifetime. QP fields: context_sessionNumber"
}
dimension: context_view_number {
type: number
sql: ${TABLE}.context_viewNumber ;;
label: "View Number"
group_label: "View Meta Data"
description: "View number of the visitor, in a lifetime. QP fields: context_viewNumber"
}
dimension: context_id {
type: string
sql: ${TABLE}.context_id ;;
label: "Visitor ID"
group_label: "Visitor"
description: "ID unique to the visitor, created in browser. QP fields: context_id"
}
dimension_group: time_data_points {
label: ""
type: time
timeframes: [time, hour_of_day, date, day_of_week, week, week_of_year, month, month_name, quarter_of_year, year]
sql: ${TABLE}.property_event_ts ;;
group_label: "⏰ Date & Time"
description: "Timestamp of the user action. QP fields: property_event_ts"
hidden: yes
}
dimension: type {
type: string
sql: ${TABLE}.type ;;
label: "Subtype"
description: "Action type. QP fields: type"
}
dimension: name {
type: string
sql: ${TABLE}.name ;;
label: "Action Name"
description: "Action name. QP fields: name"
}
dimension: meta_type {
type: string
sql: ${TABLE}.meta_type ;;
label: "Action Meta Type"
description: "Action meta type. QP fields: meta_type"
}
dimension: voucher_label {
type: string
sql: ${TABLE}.voucher_label ;;
label: "Voucher Label"
description: "Voucher Label"
}
dimension: user_interaction_type {
type: string
sql: ${TABLE}.user_interaction_type ;;
label: "User Interaction Type"
description: "User interaction type. QP fields: user_interaction_type"
}
measure: total_visitor_views {
type: number
sql: COUNT(DISTINCT ${TABLE}.view_id) ;;
group_label: "Visitor"
description: "Number of unique views. QP fields: context_viewNumber, context_id"
}
}