-
Notifications
You must be signed in to change notification settings - Fork 0
/
com_snowplowanalytics_snowplow_ad_click_1.view.lookml
76 lines (59 loc) · 1.93 KB
/
com_snowplowanalytics_snowplow_ad_click_1.view.lookml
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
# Copyright (c) 2013-2014 Snowplow Analytics Ltd. All rights reserved.
#
# This program is licensed to you under the Apache License Version 2.0,
# and you may not use this file except in compliance with the Apache License Version 2.0.
# You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the Apache License Version 2.0 is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the Apache License Version 2.0 for the specific language governing permissions and limitations there under.
#
# Author(s): Yali Sassoon
# Copyright: Copyright (c) 2013-2014 Snowplow Analytics Ltd
# License: Apache License Version 2.0
#
# Compatibility: iglu:com.snowplowanalytics.snowplow/ad_click/jsonschema/1-0-0
- view: ad_clicks
sql_table_name: atomic.com_snowplowanalytics_snowplow_ad_click_1
fields:
# DIMENSIONS #
- dimension: event_id
primary_key: true
sql: ${TABLE}.root_id
- dimension: timestamp
sql: ${TABLE}.root_tstamp
- dimension_group: timestamp
type: time
timeframes: [time, hour, date, week, month]
sql: ${TABLE}.root_tstamp
- dimension: click_id
sql: ${TABLE}.click_id
- dimension: impression_id
sql: ${TABLE}.impression_id
- dimension: zone_id
sql: ${TABLE}.zone_id
- dimension: banner_id
sql: ${TABLE}.banner_id
- dimension: campaign_id
sql: ${TABLE}.campaign_id
- dimension: advertiser_id
sql: ${TABLE}.advertiser_id
- dimension: target_url
sql: ${TABLE}.target_url
- dimension: cost_model
sql: ${TABLE}.cost_model
- dimension: cost
type: number
decimals: 2
sql: ${TABLE}.cost
# MEASURES #
- measure: count
type: count_distinct
sql: ${event_id}
- measure: cpc_cost
type: sum
decimals: 2
sql: ${cost}
filters:
cost_model: "cpc"