Сообщения

Сообщения за март, 2019

Load ticks data from single Cassandra instance into Cluster (scala code)

I have one single instance Cassandra with source data, only 3 CF: There are 3 tables, mts_src.ticks - contains information about Forex tick data for 28 tickers, db_tsunx - Unixtimestamp. mts_src.ticks_count_days - Total ticks count by day and ticker_id. mts_src.ticks_count_total - Total ticks count by ticker_id. DROP TABLE mts_src.ticks; DROP TABLE mts_src.ticks_count_days; DROP TABLE mts_src.ticks_count_total; CREATE TABLE mts_src.ticks( ticker_id int , ddate date , ts bigint, db_tsunx bigint, ask double , bid double , PRIMARY KEY (( ticker_id, ddate ), ts, db_tsunx) ) WITH CLUSTERING ORDER BY ( ts DESC , db_tsunx DESC ); CREATE TABLE mts_src.ticks_count_days( ticker_id int , ddate date , ticks_count counter, PRIMARY KEY (ticker_id, ddate) ) WITH CLUSTERING ORDER BY ( ddate DESC ); CREATE TABLE mts_src.ticks_count_total( ticker_id int , ticks_count counter, PRIMARY KEY (ticker_id) ); Data from mts_src.ticks is using for bars an