-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmako.view.lkml
85 lines (77 loc) · 1.87 KB
/
mako.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
view: mako {
sql_table_name: smartdc.mako ;;
dimension: primary_key {
primary_key: yes
hidden: yes
sql: ${TABLE}.account || ${TABLE}.name ;;
}
dimension: account {
description: "UFDS UUID account number"
type: string
sql: ${TABLE}.account ;;
}
dimension: average_size_kb {
description: "Average size of objects in kb"
type: number
sql: ${TABLE}."average size kb" ;;
}
dimension: bytes {
description: "number of bytes of storage"
type: number
sql: ${TABLE}.bytes ;;
}
dimension: kilobytes {
description: "number of kilobytes of storage"
type: number
sql: ${TABLE}.kilobytes ;;
}
dimension: name {
description: "Name of the shard"
type: string
sql: ${TABLE}.name ;;
}
dimension: objects {
description: "number of objects which are ready to be deleted"
type: number
sql: ${TABLE}.objects ;;
}
dimension: region {
description: "Name of the region"
type: string
sql: ${TABLE}.region ;;
}
measure: count {
description: "Number of distinct objects returned in query"
type: count
drill_fields: [name]
}
measure: sum_p {
description: "Size of objects in PiB"
type: sum
sql: ${kilobytes}/1024.0/1024.0/1024.0/1024.0 ;;
value_format_name: decimal_3
}
measure: sum_t {
description: "Size of objects in TiB"
type: sum
sql: ${kilobytes}/1024.0/1024.0/1024.0 ;;
value_format_name: decimal_3
}
measure: sum_g {
description: "Size of objects in GiB"
type: sum
sql: ${kilobytes}/1024.0/1024.0 ;;
value_format_name: decimal_3
}
measure: total_objects {
description: "Total number of objects"
type: sum
sql: ${objects} ;;
}
measure: total_avg_object_size {
description: "Total average object size"
type: average
sql: ${kilobytes}/${objects};;
value_format_name: decimal_3
}
}