This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlinkedin_video_ad.view.lkml
101 lines (92 loc) · 1.73 KB
/
linkedin_video_ad.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
view: linkedin_video_ad {
derived_table: {
sql:
(
SELECT video_ad_history.* FROM `{{ video_ad.linkedin_ads_schema._sql }}.video_ad_history` as video_ad_history
INNER JOIN (
SELECT
id, max(last_modified_time) as max_fivetran_synced
FROM `{{ video_ad.linkedin_ads_schema._sql }}.video_ad_history`
GROUP BY id) max_video_history
ON max_video_history.id = video_ad_history.id
AND max_video_history.max_fivetran_synced = video_ad_history.last_modified_time
) ;;
}
dimension: id {
primary_key: yes
type: number
sql: ${TABLE}.id ;;
}
dimension_group: _fivetran_synced {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}._fivetran_synced ;;
}
dimension: account_id {
type: number
sql: ${TABLE}.account_id ;;
}
dimension_group: account_last_modified {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.account_last_modified_time ;;
}
dimension_group: created {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.created_time ;;
}
dimension_group: last_modified {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.last_modified_time ;;
}
dimension: name {
type: string
sql: ${TABLE}.name ;;
}
dimension: owner {
type: string
sql: ${TABLE}.owner ;;
}
dimension: type {
type: string
sql: ${TABLE}.type ;;
}
measure: count {
type: count
drill_fields: [id, name]
}
}