This file contains 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
{ | |
"total": 6, | |
"queryTime": 4, | |
"_aggregations": { | |
"cities": { | |
"buckets": [ | |
{ | |
"aggregations": { | |
"avg_fahrenheit": 62.666666666666664, | |
"avg_celsius": 17.037037037037035 |
This file contains 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
[ | |
{ | |
"city": "Los Angeles", | |
"temp": 50 | |
}, | |
{ | |
"city": "Los Angeles", | |
"temp": 45 | |
}, | |
{ |
This file contains 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
{ | |
"total": 46, | |
"queryTime": 7, | |
"_aggregations": { | |
"pages": { | |
"buckets": [ | |
{ | |
"aggregations": { | |
"views": 18 | |
}, |
This file contains 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
[ | |
{"primary_key":-405357180,"analytics_key":"customer.liferay.com","touchpoint":"https://customer.liferay.com/documentation/7.0/reference/-/official_documentation/reference/elasticsearch-settings","event_date":"2018-05-07T04:00","user_id":"0361d8e0-72a3-11e8-944b-41a597564fee","country":"Australia","region":"New South Wales","city":"Mascot","browser_name":"Safari","device_type":"Desktop","platform_name":"macOS","engagement":0.27,"time_on_page":10000,"views":1,"bounces":0}, | |
{"primary_key":-41466125,"analytics_key":"www.liferay.com","touchpoint":"https://www.liferay.com/","event_date":"2018-06-13T22:00","user_id":"AWDs48iERQhVcGP_61oT","country":"United States","region":"California","city":"Montclair","browser_name":"Chrome","device_type":"Desktop","platform_name":"macOS","engagement":0.27,"time_on_page":3000,"views":1,"bounces":1}, | |
{"primary_key":-1988533760,"analytics_key":"www.liferay.com","touchpoint":"https://www.liferay.com/","event_date":"2018-06-23T01:00","user_id":"2174c680-7681-11e8-983c-0 |
This file contains 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
[ | |
{ | |
"identifier": 1, | |
"email": "iliyan.peychev@liferay.com", | |
"event": "pageView", | |
"url": "http://www.liferay.com" | |
}, | |
{ | |
"identifier": 2, | |
"email": "iliyan.peychev@liferay.com", |
This file contains 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
[ | |
{ | |
"identifier": 1, | |
"first_name": "Etta", | |
"last_name": "James" | |
}, | |
{ | |
"identifier": 2, | |
"first_name": "James", | |
"last_name": "Stewart" |
This file contains 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
#!/usr/bin/python | |
import os | |
from os import walk | |
from cassandra.cluster import Cluster | |
from cassandra.query import BatchStatement | |
from cassandra.query import SimpleStatement | |
def list_all_data_file_paths(): | |
data_file_paths = [] |
This file contains 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
{ | |
"took": 3, | |
"timed_out": false, | |
"_shards": { | |
"total": 5, | |
"successful": 5, | |
"skipped": 0, | |
"failed": 0 | |
}, | |
"hits": { |
This file contains 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
#!/usr/bin/python | |
import os | |
from os import walk | |
from cassandra.cluster import Cluster | |
def list_all_data_file_paths(): | |
data_file_paths = [] | |
for (dirpath, dirnames, filenames) in walk('data'): |
This file contains 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
CREATE TABLE form_metrics ( | |
analyticsKey VARCHAR, | |
formId BIGINT, | |
year int, | |
month int, | |
day int, | |
views BIGINT, | |
submissions BIGINT, | |
PRIMARY KEY(analyticsKey, formId, year, month, day) | |
) |