java - How to get range of rows using spark in Cassandra -


i have table in cassandra structure

create table dmp.table (  pid text primary key, day_count map<text, int>,  first_seen map<text, timestamp>,  last_seen map<text, timestamp>,  usage_count map<text, int> } 

now i'm trying query using spark-cassandra driver , there can chunks of data. in if have 100 rows , should able 0-10 rows 10 -20 , on.

 cassandrajavardd<cassandrarow> cassandrardd = cassandrajavautil.javafunctions(javasparkcontext).cassandratable(keyspacename, tablename); 

i'm asking there no column in table can query using in clause range of rows.

you can add auto-incrementing id coloumn -- see dataframe-ified zip index solution. can query newly-created id column:

select ... id >= 0 , id < 10; 

etc.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -