Skip to content

Instantly share code, notes, and snippets.

@eliquious
Created May 4, 2015 22:45
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 eliquious/707c2d6527872921a21f to your computer and use it in GitHub Desktop.
Save eliquious/707c2d6527872921a21f to your computer and use it in GitHub Desktop.
SKL
>>> 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 }
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