How to get Nth row data from cassandra table?

19 views
Skip to first unread message

Mahesh Kumar

unread,
Aug 31, 2017, 2:48:37 AM8/31/17
to DataStax Java Driver for Apache Cassandra User Mailing List
How to get Nth row data from cassandra. for example: i will get 23 from some logic i have used in Java. Now i have to return that 23rd row from cassandra table.
Since, there is no auto increment in cassandra, i did't use any ascending order based key for this table. used customer_id as primary_key. unable to change table, since its a master table. 

Elie Zaccour

unread,
Aug 31, 2017, 5:00:16 AM8/31/17
to java-dri...@lists.datastax.com

Hi Mahesh,

 

One way of doing it would be to select all rows from that table and in your Java logic to go through the result set till you reach the 23rd row.

 

Regards,

--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.

 

Reply all
Reply to author
Forward
0 new messages