Service Virtualization

 View Only

Unable to query cassandra CQL queries with where condition

  • 1.  Unable to query cassandra CQL queries with where condition

    Posted Nov 02, 2015 05:14 PM

    Unable to query Cassandra CQL queries with where condition. Able to retrieves data for a count query successfully, but throwing following error when a where condition CQL queried in LISA.


    Failing Query: SELECT * FROM keyspace.table where key=8678648301;

    Error: java.sql.SQLDataException: Could not find key comparator for: us_wm_item_inventory_price.us_wm_item_inventory_price

      at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.makeSelect(

      at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.makeCql(

      at org.apache.cassandra.cql.jdbc.CassandraPreparedStatement.executeQuery(

      at com.itko.lisa.jdbc.JDBCNode.makeGenericCall(

      at com.itko.lisa.jdbc.JDBCNode.executeSQL(

      at com.itko.lisa.jdbc.JDBCNodeEditor.doExec(

      at com.itko.lisa.jdbc.JDBCNodeEditor.access$500(

      at com.itko.lisa.jdbc.JDBCNodeEditor$6.doCallback(

      at com.itko.util.swing.panels.ProcessingDialog$

      at Source)


    Working Query: SELECT count(*) FROM keyspace.table;

    Result: Working fine


    Test script - Connect to Cassandra using LISA

    Step Used - SQL Database Execution (JDBC)

    JDBC Driver - org.apache.cassandra.cql.jdbc.CassandraDriver

    Connection String - jdbc:cassandra://<Cassandra_node>:<port>/<keyspace>