Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
221 views
in Technique[技术] by (71.8m points)

Using Cassandra for time-series data storage

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...