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
/
linkedin_account.view.lkml
134 lines (116 loc) · 2.46 KB
/
linkedin_account.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
view: linkedin_account {
extends: [linkedin_ads_config]
derived_table: {
sql:
(
SELECT account_history.* FROM `{{ account.linkedin_ads_schema._sql }}.account_history` as account_history
INNER JOIN (
SELECT
id, max(last_modified_time) as max_fivetran_synced
FROM `{{ account.linkedin_ads_schema._sql }}.account_history`
GROUP BY id) max_account_history
ON max_account_history.id = account_history.id
AND max_account_history.max_fivetran_synced = account_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_group: created {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.created_time ;;
}
dimension: currency {
type: string
sql: ${TABLE}.currency ;;
}
dimension_group: _date {
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.last_modified_time ;;
}
dimension: name {
type: string
sql: ${TABLE}.name ;;
}
dimension: notified_on_campaign_optimization {
type: yesno
sql: ${TABLE}.notified_on_campaign_optimization ;;
}
dimension: notified_on_creative_approval {
type: yesno
sql: ${TABLE}.notified_on_creative_approval ;;
}
dimension: notified_on_creative_rejection {
type: yesno
sql: ${TABLE}.notified_on_creative_rejection ;;
}
dimension: notified_on_end_of_campaign {
type: yesno
sql: ${TABLE}.notified_on_end_of_campaign ;;
}
dimension: reference {
type: string
sql: ${TABLE}.reference ;;
}
dimension: status {
type: string
sql: ${TABLE}.status ;;
}
dimension: total_budget_amount {
type: number
sql: ${TABLE}.total_budget_amount ;;
}
dimension: total_budget_currency_code {
type: string
sql: ${TABLE}.total_budget_currency_code ;;
}
dimension: total_budget_ends_at {
type: number
sql: ${TABLE}.total_budget_ends_at ;;
}
dimension: type {
type: string
sql: ${TABLE}.type ;;
}
dimension: version_tag {
type: string
sql: ${TABLE}.version_tag ;;
}
measure: count {
type: count
drill_fields: [id, name]
}
}