-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathepisodes.view.lkml
79 lines (66 loc) · 1.79 KB
/
episodes.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
view: episodes {
sql_table_name: game_of_thrones_19.episodes ;;
dimension: pk {
type: string
sql: CONCAT(CAST(${season_num} AS string),"-",CAST(${episode_num} AS string),"-",${opening_sequence_locations}) ;;
primary_key: yes
hidden: yes
}
dimension: unique_episode {
type: string
sql: CONCAT(CAST(${season_num} AS string),"-",CAST(${episode_num} AS string)) ;;
}
dimension: episode_num {
label: "Episode"
type: number
sql: ${TABLE}.episode_num ;;
}
dimension: air_date {
description: "Original Air Date of Episode"
type: string
sql: ${TABLE}.air_date ;;
}
dimension: description {
description: "Episode Description"
type: string
sql: ${TABLE}.description ;;
}
dimension: link {
description: "IMDb Link to Episode"
type: string
html: <a href="https://www.imdb.com/{{value}}" ;;
sql: ${TABLE}.link ;;
}
dimension: opening_sequence_locations {
description: "Locations seen in the opening title animation."
type: string
sql: ${TABLE}.opening_sequence_locations ;;
map_layer_name: major_locations
}
dimension: season_num {
label: "Season"
type: number
sql: ${TABLE}.season_num ;;
}
dimension: title {
description: "Title of Episode"
type: string
sql: ${TABLE}.title ;;
}
measure: count_episodes {
label: "Number of Episodes"
type: count_distinct
sql: ${unique_episode} ;;
drill_fields: [detail*]
}
measure: scene_length {
label: "Runtime (m)"
description: "Total length of episode in minutes. Same as Screentime, but not tied to Character/Scene"
type: sum_distinct
sql_distinct_key: ${scenes.unique_scene} ;;
sql: ${scenes.scene_length_secs}/60 ;;
}
set: detail {
fields: [season_num,episode_num,title,description]
}
}