an impala client for ruby
Ruby
Latest commit 68f1bc2 Oct 9, 2014 @colinmarc fix build link in readme
Failed to load latest commit information.
lib
test
thrift pull in new thrift defs, delete thrift defs we didn't actually need Sep 17, 2013
.gitignore
.travis.yml
Gemfile
LICENSE.txt initial commit Jan 23, 2013
README.md
Rakefile
impala.gemspec

README.md

impala-ruby

build   rubygems

This is a ruby client for Cloudera Impala. You use it like this:

require 'impala'

Impala.connect('host', 21000) do |conn|
  conn.query('SELECT zip, income FROM zipcode_incomes LIMIT 5')
end
# => [{:zip=>'02446', :income=>89597}, ...]

You can also use cursors to avoid loading the entire result set into memory:

conn = Impala.connect('host', 21000)
cursor = conn.execute('SELECT zip, income FROM zipcode_incomes ORDER BY income DESC')

one_row = cursor.fetch_row
cursor.each do |row|
  # etc
end

conn.close