-
Notifications
You must be signed in to change notification settings - Fork 0
/
time_period_id_1.view.lkml
129 lines (113 loc) · 2.96 KB
/
time_period_id_1.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
117
118
119
120
121
122
123
124
125
126
127
128
129
view: time_period_id_1 {
# Or, you could make this view a derived table, like this:
derived_table: {
sql: SELECT
product_id
, time_type
, time_period_id
, population_id
, load_type_id
, description
, web_id
, location_id
, break_id
, visitors
FROM public.mmxmp_production_all_products
WHERE {% condition time_period_id1 %} time_period_id {% endcondition %}
AND {% condition product_id1 %} product_id {% endcondition %}
AND {% condition population_id1 %} population_id {% endcondition %}
;;
}
#
# parameter: input_time_period_id1 {
# type: unquoted
# }
#
# parameter: input_population_id1 {
# type: unquoted
# }
#
# parameter: input_product_id1 {
# type: unquoted
# }
# # Define your dimensions and measures here, like this:
dimension: product_id1 {
description: "Unique product_id for each web site"
type: number
sql: ${TABLE}.product_id ;;
}
dimension: time_type1 {
description: "Unique time_type for each web site"
type: number
sql: ${TABLE}.time_type ;;
}
dimension: time_period_id1 {
description: "Unique time_period_id for each web site"
type: number
sql: ${TABLE}.time_period_id ;;
}
dimension: population_id1 {
description: "Unique population_id for each web site"
type: number
sql: ${TABLE}.population_id ;;
}
dimension: load_type_id1 {
description: "Unique load_type_id for each web site"
type: number
sql: ${TABLE}.load_type_id ;;
}
dimension: description1 {
description: "Unique description for each web site"
type: string
sql: ${TABLE}.description ;;
}
dimension: web_id1 {
description: "Unique web_id for each web site"
type: number
sql: ${TABLE}.web_id ;;
}
dimension: location_id1 {
description: "Unique location_id for each web site"
type: number
sql: ${TABLE}.location_id ;;
}
dimension: break_id1 {
description: "Unique break_id for each web site"
type: number
sql: ${TABLE}.break_id ;;
}
dimension: visitors1 {
description: "Unique visitors for each web site"
type: number
sql: ${TABLE}.visitors ;;
}
# dimension: str_product_id1 {
# description: "Unique product_id for each web site"
# type: string
# sql: TO_VARCHAR(${product_id1}) ;;
# }
#
# dimension: str_time_type1 {
# description: "Unique time_type for each web site"
# type: string
# sql: ${TABLE}.time_type ;;
# }
#
# dimension: str_time_period_id1 {
# description: "Unique time_period_id for each web site"
# type: string
# sql: ${TABLE}.time_period_id ;;
# }
#
# dimension: str_population_id1 {
# description: "Unique population_id for each web site"
# type: string
# sql: ${TABLE}.population_id ;;
# }
#
# dimension: str_load_type_id1 {
# description: "Unique load_type_id for each web site"
# type: string
# sql: ${TABLE}.load_type_id ;;
# }
}