forked from cheddar/pivot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig-example-wiki.yaml
More file actions
111 lines (73 loc) · 2.91 KB
/
config-example-wiki.yaml
File metadata and controls
111 lines (73 loc) · 2.91 KB
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
# Only the dataSources key will be used from the exmaple config
dataSources:
- name: wiki
# This is the title that will grace this data source in the the menus
title: Wikipedia Example
# Use the native engine, all calculations will be done in Node.JS. Good for up to 100k rows of data.
engine: native
# The file representing the datasource relative to repo root
source: assets/data/wikiticker-2015-09-12-sampled.json
# This datasource was scraped using https://github.com/implydata/wikiticker
# GitHub does not like large files so only a sampled file is checked in
# There is also a non-sampled file with the filter: isAnonymous == true applied, to use it set:
# source: assets/data/wikiticker-2015-09-12-anonymous.json
# Run `assets/data-raw/process-wikiticker-2015-09-12` to get the full example file
# The primary time attribute of the data refers to the attribute that must always be filtered on
# This is particularly useful for Druid data sources as they must always have a time filter.
timeAttribute: time
# The refresh rule describes how often the data source looks for new data. Default: 'query'/PT1M (every minute)
# In this case it has to be fixed since this data source is static
refreshRule:
rule: fixed # also possible: 'query' and 'realtime'
time: 2015-09-13T00:00:00Z
# The default duration for the time filter (if not set P1D is used)
defaultDuration: P1D
# The default sort measure name (if not set the first measure name is used)
defaultSortMeasure: delta
# The default filter in the UI, must be an AND of INs (or just a single IN)
#defaultFilter: $channel.in(["#en.wikipedia", "#de.wikipedia"])
# The names of dimensions that are pinned by default (in order that they will appear in the pin bar
defaultPinnedDimensions:
- channel
- namespace
- isRobot
introspection: no-autofill
dimensions:
- name: time
type: TIME
- name: channel
- name: cityName
- name: comment
- name: countryIso
title: Country ISO
expression: $countryIsoCode
- name: countryName
- name: isAnonymous
- name: isMinor
- name: isNew
- name: isRobot
- name: isUnpatrolled
- name: metroCode
- name: namespace
- name: page
- name: regionIso
title: Region ISO
expression: $regionIsoCode
- name: regionName
- name: user
measures:
- name: count
title: Rows
expression: $main.count()
- name: delta
- name: avg_delta
expression: $main.average($delta)
- name: added
- name: avg_added
expression: $main.average($added)
- name: deleted
- name: avg_deleted
expression: $main.average($deleted)
- name: unique_users
title: Unique Users
expression: $main.countDistinct($user)