-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbigquery.explore.lkml
55 lines (53 loc) · 1.46 KB
/
bigquery.explore.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
include: "bigquery.*.view.lkml"
explore: gsod {
from: bq_gsod
join: zipcode_station {
from: bq_zipcode_station
view_label: "Geography"
type: left_outer
relationship: many_to_one
sql_on: ${gsod.station_id} = ${zipcode_station.nearest_station_id}
and ${gsod.year} = ${zipcode_station.year};;
}
join: stations {
from: bq_stations
type: left_outer
relationship: many_to_one
sql_on: ${zipcode_station.nearest_station_id} = ${stations.station_id} ;;
}
join: zipcode_county{
from: bq_zipcode_county
view_label: "Geography"
type: left_outer
relationship: many_to_one
sql_on: ${zipcode_station.zipcode} = ${zipcode_county.zipcode} ;;
}
join: zipcode_facts {
from: bq_zipcode_facts
view_label: "Geography"
type: left_outer
relationship: one_to_many
sql_on: ${zipcode_county.zipcode} = ${zipcode_facts.zipcode} ;;
}
}
explore: zipcode_county {
from: bq_zipcode_county
join: zipcode_facts {
from: bq_zipcode_facts
type: left_outer
sql_on: ${zipcode_county.zipcode} = ${zipcode_facts.zipcode} ;;
relationship: one_to_many
}
join: zipcode_station {
from: bq_zipcode_station
type: left_outer
relationship: many_to_one
sql_on: ${zipcode_county.zipcode} = ${zipcode_station.zipcode} ;;
}
join: stations {
from: bq_stations
type: left_outer
relationship: one_to_one
sql_on: ${zipcode_station.nearest_station_id} = ${stations.station_id} ;;
}
}