I am running a proof of concept on CMX 10.2.1 and using APIs to retrieve data. I wanted to check if there is another way to connect to database to retrieve the data.
CMX uses three databases within it.
a. Redis - For Current data
b. Cassandra - For Historical Information
c. PostGres - For Configuration data
Connect user session data is stored in Redis 6382, and the supported method is to export list of users via the Advanced Search option to a CSV file.
We can export raw data of the location via a Cassandra to CSV output.
try:
[cmxadmin@cmx bin]$ cassandraexport
Usage Syntax: cassandraexport --key <value>
Supported key/value pairs.
--date <yyyy/mm/dd>
--table <table name>
--file <filename>
--sql <sql statement>
--rowsperfetch <rows per fetch>
example:
./cassandraexport --sql "select * from hist_mob" --file pwalawal.csv
A feature of 10.3 will be to output analytics data to CSV tables.
CLI command to backup and restore db on CMX 10.2 exist:
cmxctl config backup
cmxctl config backup -i floormaps
cmxctl config restore
The BEST method to get large amounts of data from CMX is to subscribe to notifications that occur whenever a new location calculation occurs, then build your own history database through Northbound Notifications.
Comments
0 comments
Please sign in to leave a comment.