Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7589863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T20:16:01+00:00 2026-05-30T20:16:01+00:00

I access cassandra from the ruby gem. I want to retrive data from cassandra

  • 0

I access cassandra from the ruby gem. I want to retrive data from cassandra db by specifying which columns I want to. whenever I run this

conn.get(:column_family, ‘key1’, [63,62])

I get the following error,

 TypeError: can't convert Array into String
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/gems/thrift-0.8.0/lib/thrift/transport/framed_transport.rb:84:in `write'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/gems/thrift-0.8.0/lib/thrift/protocol/binary_protocol.rb:112:in `write_string'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/gems/thrift-0.8.0/lib/thrift/client.rb:35:in `write'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/gems/thrift-0.8.0/lib/thrift/client.rb:35:in `send_message'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/bundler/gems/cassandra-7474449189f3/vendor/0.8/gen-rb/cassandra.rb:107:in `send_multiget_slice'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/bundler/gems/cassandra-7474449189f3/vendor/0.8/gen-rb/cassandra.rb:102:in `multiget_slice'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/bundler/gems/thrift_client-00893a3accc5/lib/thrift_client/abstract_thrift_client.rb:150:in `handled_proxy'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/bundler/gems/thrift_client-00893a3accc5/lib/thrift_client/abstract_thrift_client.rb:60:in `multiget_slice'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/bundler/gems/cassandra-7474449189f3/lib/cassandra/protocol.rb:64:in `_multiget'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/bundler/gems/cassandra-7474449189f3/lib/cassandra/cassandra.rb:619:in `multi_get'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/bundler/gems/cassandra-7474449189f3/lib/cassandra/cassandra.rb:592:in `get'
    from (irb):5:in `block in irb_binding'
    from /home/ubuntu/.rvm/gems/ruby-1.9.2-p180@spaghetti/gems/connection_pool-0.1.0/lib/connection_pool.rb:41:in `with'
    from (irb):4
    from /home/ubuntu/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>'

A python package ‘pycassa’ provides the option to specify which columns to be retrieved. How to do that in ruby??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T20:16:03+00:00Added an answer on May 30, 2026 at 8:16 pm

    Currently .get() and .multi_get() do not accept a list of column names. There is an open issue for this on GitHub. As a work around you can use .get_columns() instead.

    conn.get_columns(:column_family, 'key1', [63,62])
    

    This returns an array of values in the same order as you specified for your column names. Alternatively you could use the cassandra-cql gem:

    handle.execute("select 63,62 from column_family where KEY = 'key1'").fetch
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Example: // access fields directly private void doThis() { return doSomeWork(this.data); } // receive
in access i am doing this: insert into accounts_changes (select * from accounts where
My Access database table has 2 columns: name and price. I want to do
In Access VBA, I want to use values from a Settings table, instead of
Access can open DBF (dBase) files, but instead of physically converting the data into
Microsoft Access is a slick way to access data in a MS SQL Server
Which access modifiers which when used with the method makes it available to all
I'm looking for a common data access framework that will provide portability across various
Access 2003. I have two versions of an MS Access based application (data is
Using Access 2007 vba addressing an Excel 2007 workbook (WB).... This routine adds a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.