Skip to content

Commit

Permalink
Save strings (allegro#295)
Browse files Browse the repository at this point in the history
* expression -> formula

* DataSource -> DataCube

* dataSource -> dataCube

* test tidy up

* added back compat tests

* back compat route tests

* fixed travis
  • Loading branch information
vogievetsky authored and lorem--ipsum committed Jul 18, 2016
1 parent 01e46b5 commit af4f5b0
Show file tree
Hide file tree
Showing 137 changed files with 1,131 additions and 1,823 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
/typings/
/.travis.yml
/travis-test
/full-test
/run
/run-coverage
/CONTRIBUTING.md
/config.yaml.sample
/gulpfile.js
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

For updates follow [@implydata](https://twitter.com/implydata) on Twitter.

## 0.9.21

- Renamed `DataSource` to `DataCube`
- Changed Dimension and Measure `expression` to `formula`

## 0.9.20

- Fixes for sorting on dimension when there are multiple splits
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ Finally you have to create a `config.yaml` file. (or use the sample)
```

The `--with-comments` flag adds docs about what goes into the config.
Alternatively you can read the comments in the [sample config file](/config.yaml.sample).

Then you are ready to

Expand Down
58 changes: 29 additions & 29 deletions config-examples.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Only the dataSources key will be used from the exmaple config
dataSources:
# Only the dataCubes key will be used from the exmaple config
dataCubes:

- name: wiki

# This is the title that will grace this data source in the the menus
# This is the title that will grace this data cube 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
clusterName: native

# The file representing the datasource relative to repo root
source: assets/data/wikiticker-2015-09-12-sampled.json
Expand All @@ -18,11 +18,11 @@ dataSources:
# Run `assets/data/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.
# This is particularly useful for Druid data cubes 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
# The refresh rule describes how often the data cube looks for new data. Default: 'query'/PT1M (every minute)
# In this case it has to be fixed since this data cube is static
refreshRule:
rule: fixed # also possible: 'query' and 'realtime'
time: 2015-09-13T00:00:00Z
Expand Down Expand Up @@ -58,45 +58,45 @@ dataSources:
- name: time
type: TIME
kind: time
expression: $time
formula: $time

# - name: sometimeLater
# title: Sometime Later
# kind: time

- name: channel
title: Channel
expression: $channel
formula: $channel

- name: cityName
title: City Name
expression: $cityName
formula: $cityName

- name: comment
title: Comment
expression: $comment
formula: $comment

- name: commentLength
title: Comment Length
expression: $commentLength
formula: $commentLength
kind: number

- name: commentLengthOver100
title: Comment Length Over 100
expression: $commentLength > 100
formula: $commentLength > 100
kind: boolean

- name: countryIso
title: Country ISO
expression: $countryIsoCode
formula: $countryIsoCode

- name: countryName
title: Country Name
expression: $countryName
formula: $countryName

- name: deltaBucket100
title: Delta Bucket
expression: $deltaBucket100
formula: $deltaBucket100
kind: number

- name: isAnonymous
Expand All @@ -117,58 +117,58 @@ dataSources:

- name: isUnpatrolled
title: Is Unpatrolled
expression: $isUnpatrolled
formula: $isUnpatrolled

- name: metroCode
title: Metro Code
expression: $metroCode
formula: $metroCode

- name: namespace
title: Namespace
expression: $namespace
formula: $namespace

- name: page
title: Page
expression: $page
formula: $page

- name: regionIso
title: Region ISO
expression: $regionIsoCode
formula: $regionIsoCode

- name: regionName
title: Region Name
expression: $regionName
formula: $regionName

- name: user
title: User
expression: $user
formula: $user

- name: userChars
title: User Chars
expression: $userChars
formula: $userChars


measures:

- name: count
title: Rows
expression: $main.count()
formula: $main.count()

- name: delta

- name: avg_delta
expression: $main.average($delta)
formula: $main.average($delta)

- name: added

- name: avg_added
expression: $main.average($added)
formula: $main.average($added)

- name: deleted

- name: avg_deleted
expression: $main.average($deleted)
formula: $main.average($deleted)

- name: unique_users
title: Unique Users
expression: $main.countDistinct($user)
formula: $main.countDistinct($user)
Loading

0 comments on commit af4f5b0

Please sign in to comment.