Created
May 4, 2015 22:45
-
-
Save eliquious/707c2d6527872921a21f to your computer and use it in GitHub Desktop.
SKL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> INSERT { | |
... year: 2014, month: 4, day: 1, | |
... key: '20140401', | |
... value: 1 | |
... } INTO COUNTER visits; | |
{ status_code: 2000, status: 'OK' } | |
>>> INSERT {key: '0x045678', value: 5} INTO CACHE latest_voltage; | |
{ status_code: 2000, status: 'OK' } | |
>>> CREATE HLL hyperlog_visits USING TYPE Visit CLUSTERED BY yyyymmdd; | |
{ | |
status_code: 2000, | |
status: 'OK', | |
storage_type: 'HLL', | |
name: 'hyperlog_visits', | |
clustered: true, | |
cluster_keys: ['yyyymmdd'], | |
data_type: 'Visit' | |
} | |
>>> INSERT { | |
... yyyymmdd: 20140401, | |
... value: '10.82.12.184' | |
... } INTO HLL hyperlog_visits; | |
OK | |
>>> FORWARD { | |
... yyyymmdd: concat(evt.year, evt.month, evt.day), | |
... value: ent.ipaddr | |
... } INTO HLL hyperlog_visits FROM LOG events AS evt; | |
OK | |
>>> SELECT FROM HLL hyperlog_visits WHERE yyyymmdd = '20140401'; | |
{ count: 512486 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type HyperLogValue { | |
// value is required | |
version 1 { | |
required value string | |
} | |
} | |
type KeyValuePair { | |
// Version 1 required fields | |
version 1 { | |
required string key | |
required any value | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment