-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstorage_forecast_build.view.lkml
58 lines (51 loc) · 1.34 KB
/
storage_forecast_build.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
# If necessary, uncomment the line below to include explore_source.
# include: "joyent_public_cloud.model.lkml"
view: storage_forecast_build {
derived_table: {
explore_source: storageforecast {
column: delivery_raw {}
column: region {
field: step_storageforecast.region
}
column: halfyear_target { field: step_storageforecast.halfyear_target }
filters: {
field: step_storageforecast.group
value: "SPC"
}
}
}
dimension: primkey {
hidden: yes
primary_key: yes
sql: ${region} || ${delivery_raw}::TEXT ;;
}
dimension: region {
hidden: yes
}
dimension_group: delivery {
description: "How much PiB will be delivered"
type: time
sql: ${TABLE}.delivery_raw ;;
}
dimension: build_duration{
description: "How long the build will take in months"
type: number
sql: 6 ;;
}
dimension_group: build_start {
description: "The start time of the Build"
type: time
sql: ${delivery_raw} - interval '${build_duration} months';;
}
dimension: halfyear_target_raw {
description: "Which half year this is targeted to deliver in"
hidden: yes
type: number
sql: ${TABLE}.halfyear_target ;;
}
measure: halfyear_target {
description: "Sum of the halfyear_target"
type: sum
sql: ${halfyear_target_raw} ;;
}
}