Cassandra table structure suggestion and way of query -


i trying create following hierarchy: userid rowkey, hourly time series columns , inside each hourly column want have user specific information such hourly activity.

{    userid:long    {       timestamp:datetime{          pageview: integer,          clicks:integer       }    } 

i've read possible achieve using supercolumns @ same time mentioned supercolumns outdated right now. if true, alternatives can use?

could please provide me cql / java thrift example how should create , insert such type of structure in cassandra?

thanks!

you can user composite primary key this, add table creation cql query table. , can use counter column clicks.

create table user_click_by_hour( userid long, time_stamp timestamp, clicks int, pageview int, primary key(userid,time_stamp) 

)


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -