-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpapi.view.lkml
142 lines (127 loc) · 2.98 KB
/
papi.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
142
view: papi {
sql_table_name: smartdc.papi ;;
dimension: active {
description: "boolean papi.active is this package currently active"
type: yesno
sql: ${TABLE}.active ;;
}
dimension: dcgroup {
description: "papi.dcgroup "
type: string
sql: ${TABLE}.dcgroup ;;
}
dimension: billing_tag {
description: "papi.billing_tag"
type: string
sql: ${TABLE}.billing_tag ;;
}
dimension: common_name {
description: "papi.common_name"
type: string
sql: ${TABLE}.common_name ;;
}
dimension: compound_primary_key {
primary_key: yes
hidden: yes
sql: ${TABLE}.uuid|| ${TABLE}.name || ${TABLE}.version || ${TABLE}.dcgroup;;
}
dimension: cpu_cap {
description: "papi.cpu_cap"
type: number
sql: ${TABLE}.cpu_cap ;;
}
dimension: fss {
description: "papi.fss"
type: number
sql: ${TABLE}.fss ;;
}
dimension: group {
description: "papi.group"
type: string
sql: ${TABLE}."group" ;;
}
dimension: max_lwps {
description: "papi.max_lwps"
type: number
sql: ${TABLE}.max_lwps ;;
}
dimension: max_physical_memory {
description: "papi.max_physical_memory"
type: number
sql: ${TABLE}.max_physical_memory ;;
}
dimension: max_swap {
description: "papi.max_swap"
type: number
sql: ${TABLE}.max_swap ;;
}
dimension: name {
description: "papi.name"
type: string
sql: ${TABLE}.name ;;
}
dimension: quota {
description: "papi.quota"
type: number
sql: ${TABLE}.quota ;;
}
dimension: quota_g {
description: "papi.quota in GiB"
type: number
sql: ${TABLE}.quota/1024.0/1024.0 ;;
value_format_name: decimal_2
}
dimension: uuid {
description: "papi.uuid for this package"
type: string
sql: ${TABLE}.uuid ;;
}
dimension: v {
description: "papi.v version of JSON format"
type: number
sql: ${TABLE}.v ;;
}
dimension: vcpus {
description: "papi.vcpus"
type: number
sql: ${TABLE}.vcpus ;;
}
dimension: version {
description: "papi.version the version of the package"
type: string
sql: ${TABLE}.version ;;
}
dimension: zfs_io_priority {
description: "papi.zfs_io_priority"
type: number
sql: ${TABLE}.zfs_io_priority ;;
}
measure: count {
description: "Number of distinct objects returned in query"
type: count
drill_fields: [name, common_name]
}
measure: total_ram_g {
description: "Sum of the max_physical_memory in GiB"
type: sum
sql: ${max_physical_memory}/1024.0;;
value_format_name: decimal_2
}
measure: total_disk_g {
description: "Sum of the quota in GiB"
type: sum
sql: ${quota_g};;
}
measure: total_ram_t {
description: "Sum of the max_physical_memory in TiB"
type: sum
sql: ${max_physical_memory}/1024.0/1024.0;;
value_format_name: decimal_2
}
measure: total_disk_t {
description: "Sum of the quota in TiB"
type: sum
sql: ${quota_g}/1024.0;;
value_format_name: decimal_2
}
}