问题
I'm a newbie to Cassandra and now evaluate it for our needs here - I need to handle a dynamic storage which holds a signal data from many sources. Each source provides, together with it's meta-data values, a continuous stream of signal data (time-value series). What is the best data-model, even just as a starting-point, to handle this kind of data? Is it possible to insert the data as a vector (and not sample by sample) using CQL? Any link with concrete examples will be highly appreciated!
Thanks
Update:
Thanks a lot for the helpful comments! I looked at several examples and the method is clear. Still I have two issues:
- I see on cqlsh the time stamp-value couples on a separate rows and not within a single row (for instance, if I insert 3 pairs of time stamp-values into the same key I expect to get it on query 1 row with 3 time stamp columns
- Is it possible to INSERT a vector of values (and not repeated INSERTs)?
thanks
回答1:
Is it possible to INSERT a vector of values (and not repeated INSERTs)?
I hope you are trying to use Batch execution. This is your good starting point. http://docs.datastax.com/en/cql/3.1/cql/cql_reference/batch_r.html
Or you might be looking for Collection Type. Please note that they have their own limitations. https://docs.datastax.com/en/cql/3.0/cql/cql_using/use_collections_c.html
As mentioned in other answers, article by Patrick McFadin should get you started.
Hope it helps!
来源:https://stackoverflow.com/questions/36480280/using-cassandra-for-time-series-data-storage