This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
campaign.view.lkml
167 lines (143 loc) · 2.77 KB
/
campaign.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
include: "account.view"
include: "fivetran_base.view"
explore: campaign_fb_adapter {
view_name: campaign
from: campaign_fb_adapter
hidden: yes
join: account {
from: account_fb_adapter
type: left_outer
sql_on: ${campaign.account_id} = ${account.id} ;;
relationship: many_to_one
}
}
view: campaign_fb_adapter {
extends: [fivetran_base_fb_adapter, facebook_ads_config]
sql_table_name: {{ campaign.facebook_ads_schema._sql }}.campaign_history ;;
dimension: id {
hidden: yes
sql: TO_CHAR(${TABLE}.id) ;;
}
dimension: account_id {
hidden: yes
type: number
sql: ${TABLE}.account_id ;;
}
dimension: boosted_object_id {
hidden: yes
type: number
sql: ${TABLE}.boosted_object_id ;;
}
dimension: budget_rebalance_flag {
hidden: yes
type: yesno
sql: ${TABLE}.budget_rebalance_flag ;;
}
dimension: buying_type {
hidden: yes
type: string
sql: ${TABLE}.buying_type ;;
}
dimension: can_create_brand_lift_study {
hidden: yes
type: yesno
sql: ${TABLE}.can_create_brand_lift_study ;;
}
dimension: can_use_spend_cap {
hidden: yes
type: yesno
sql: ${TABLE}.can_use_spend_cap ;;
}
dimension: configured_status {
hidden: yes
type: string
sql: ${TABLE}.configured_status ;;
}
dimension_group: created {
hidden: yes
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.created_time ;;
}
dimension: effective_status {
hidden: yes
type: string
sql: ${TABLE}.effective_status ;;
}
dimension: status_active {
hidden: yes
type: yesno
sql: ${effective_status} = 'ACTIVE' ;;
}
dimension: kpi_custom_conversion_id {
hidden: yes
type: number
sql: ${TABLE}.kpi_custom_conversion_id ;;
}
dimension: kpi_type {
hidden: yes
type: string
sql: ${TABLE}.kpi_type ;;
}
dimension: name {
hidden: yes
type: string
sql: ${TABLE}.name ;;
}
dimension: objective {
hidden: yes
type: string
sql: ${TABLE}.objective ;;
}
dimension: source_campaign_id {
hidden: yes
type: number
sql: ${TABLE}.source_campaign_id ;;
}
dimension: spend_cap {
hidden: yes
type: number
sql: ${TABLE}.spend_cap ;;
}
dimension_group: start {
hidden: yes
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.start_time ;;
}
dimension: status {
hidden: yes
type: string
sql: ${TABLE}.status ;;
}
dimension_group: stop {
hidden: yes
type: time
timeframes: [
raw,
time,
date,
week,
month,
quarter,
year
]
sql: ${TABLE}.stop_time ;;
}
}