Skip to content

Instantly share code, notes, and snippets.

@andytill
Last active September 22, 2015 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andytill/03b9e547197aab9d8580 to your computer and use it in GitHub Desktop.
Save andytill/03b9e547197aab9d8580 to your computer and use it in GitHub Desktop.
Time Series Usage

Create bucket type with the table_def property.

export TAB=GeoCheckin; dev/dev1/bin/riak-admin bucket-type create $TAB "{\"props\":{ \"table_def\": \"CREATE TABLE GeoCheckin (geohash varchar not null, user varchar not null, time timestamp not null, weather varchar not null, temperature varchar, PRIMARY KEY((quantum(time, 15, s)), time, user))\"}}"

Activate it:

dev/dev1/bin/riak-admin bucket-type activate $TAB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment