-
Notifications
You must be signed in to change notification settings - Fork 0
/
converse.view.lkml
141 lines (113 loc) · 2.39 KB
/
converse.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
130
131
132
133
134
135
136
137
138
139
140
141
view: converse {
sql_table_name: StockX.converse ;;
dimension: compound_pk {
primary_key: yes
hidden: no
sql: CONCAT(${TABLE}.Item_Name, ' ', ${size});;
}
dimension: annual_high {
type: number
sql: ${TABLE}.Annual_High ;;
}
dimension: annual_low {
type: number
sql: ${TABLE}.Annual_Low ;;
}
dimension: ask_count {
type: number
sql: ${TABLE}.Ask_Count ;;
}
# dimension: average_price {
# type: number
# sql: ${TABLE}.Average_Price ;;
# }
dimension: bid_count {
type: number
sql: ${TABLE}.Bid_Count ;;
}
dimension: brand {
type: string
sql: ${TABLE}.Brand ;;
}
dimension: brand1 {
type: string
sql: ${TABLE}.Brand1 ;;
}
dimension: category {
type: string
sql: ${TABLE}.Category ;;
}
dimension: collab {
type: yesno
sql: ${TABLE}.Brand1 IS NOT Null ;;
}
dimension: current_highest_bid {
type: number
value_format_name: id
sql: ${TABLE}.Current_Highest_Bid ;;
}
dimension: image_url {
type: string
sql: ${TABLE}.Image_URL ;;
}
dimension: image {
type: string
sql: ${TABLE}.Image_URL ;;
html: <img src="{{ value }}" height = 300 width = 500>;;
}
dimension: item_name {
type: string
sql: ${TABLE}.Item_Name ;;
drill_fields: [size]
}
dimension: last_sale_price {
type: number
sql: ${TABLE}.Last_Sale_Price ;;
}
dimension: release {
type: date
sql: CAST(DATE_ADD(CAST(${TABLE}.release_date as DATE), INTERVAL 2000 YEAR) as TIMESTAMP);;
}
# dimension: release_date {
# type: date_time
# sql: ${TABLE}.Release_Date ;;
# }
dimension: retail_price {
type: number
sql: ${TABLE}.Retail_Price ;;
}
dimension: size {
type: string
sql: cast(${TABLE}.Size AS string) ;;
}
dimension: shoe_size {
type: number
sql: ${TABLE}.Size ;;
value_format: "0.0"
}
dimension: total_sale {
type: number
sql: ${TABLE}.Total_Sale ;;
drill_fields: [size, adidas_trans.Price]
}
dimension: total_sale_count {
type: number
sql: ${TABLE}.Total_Sale_Count ;;
}
dimension: volatility {
type: number
sql: ${TABLE}.Volatility ;;
}
measure: average_price {
type: sum
sql: ${TABLE}.Average_Price ;;
}
measure: total_sales {
type: sum
sql: ${TABLE}.Total_Sale ;;
}
measure: count {
type: count
drill_fields: [item_name]
}
}