-
Notifications
You must be signed in to change notification settings - Fork 1
/
uber_trips.view.lkml
80 lines (65 loc) · 1.4 KB
/
uber_trips.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
view: uber_trips {
sql_table_name: personal_finance.uber_trips ;;
dimension: car_type {
type: string
sql: ${TABLE}.car_type ;;
}
dimension: city {
type: string
sql: ${TABLE}.city ;;
}
dimension_group: ride {
type: time
timeframes: [date, month, year, month_name]
sql: ${raw_shit} ;;
}
dimension: raw_shit {
type: string
sql: concat(concat('20', substring(${TABLE}.date, 7, 2)), '-',substring(${TABLE}.date, 1, 2), '-', substring(${TABLE}.date, 4, 2)) ;;
}
dimension: month_price {
type: string
sql: concat(${ride_month}, RIGHT(${price}, CHAR_LENGTH(${price}) -1)) ;;
}
dimension: date_time {
type: string
sql: ${TABLE}.date_time ;;
}
dimension: driver {
type: string
sql: ${TABLE}.driver ;;
}
dimension: end_address {
type: string
sql: ${TABLE}.end_address ;;
}
dimension: end_time {
type: string
sql: ${TABLE}.end_time ;;
}
dimension: payment_method {
type: number
sql: ${TABLE}.payment_method ;;
value_format_name: id
}
dimension: price {
type: string
sql: ${TABLE}.price ;;
}
dimension: start_address {
type: string
sql: ${TABLE}.start_address ;;
}
dimension: start_time {
type: string
sql: ${TABLE}.start_time ;;
}
dimension: trip_id {
type: string
sql: ${TABLE}.trip_id ;;
}
measure: count {
type: count
drill_fields: []
}
}