forked from llooker/datablocks-gsod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rs.stations.view.lkml
95 lines (83 loc) · 1.55 KB
/
rs.stations.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
view: rs_stations {
sql_table_name: datablocks_gsod.stations ;;
dimension: station_id {
primary_key: yes
type: string
sql: CASE WHEN ${TABLE}.wban = '99999' THEN ${TABLE}.usaf ELSE ${TABLE}.wban END;;
}
dimension_group: time_begin_at_local {
type: time
timeframes: [
date,
week,
month,
quarter,
day_of_week,
day_of_week_index,
day_of_month,
year,
week_of_year,
month_num,
quarter_of_year
]
sql: ${TABLE}.begin ;;
convert_tz: no
}
dimension_group: time_end_at_local {
type: time
timeframes: [
date,
week,
month,
quarter,
day_of_week,
day_of_week_index,
day_of_month,
year,
week_of_year,
month_num,
quarter_of_year
]
sql: ${TABLE}.end ;;
convert_tz: no
}
dimension: call {
type: string
sql: ${TABLE}.call ;;
}
dimension: country {
type: string
sql: ${TABLE}.country ;;
}
dimension: elev {
type: string
sql: ${TABLE}.elev ;;
}
dimension: latitude {
hidden: yes
type: number
sql: ${TABLE}.lat ;;
}
dimension: longitude {
hidden: yes
type: number
sql: ${TABLE}.lon ;;
}
dimension: location {
type: location
sql_latitude:${latitude};;
sql_longitude:${longitude};;
}
dimension: name {
type: string
sql: ${TABLE}.name ;;
}
dimension: state {
type: string
sql: ${TABLE}.state ;;
}
measure: count_distinct_station {
type: count_distinct
sql: ${station_id} ;;
}
}