Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/colinmarc/impala-ruby
an impala client for ruby
https://github.com/colinmarc/impala-ruby
Last synced: 24 days ago
JSON representation
an impala client for ruby
- Host: GitHub
- URL: https://github.com/colinmarc/impala-ruby
- Owner: colinmarc
- License: mit
- Created: 2013-01-24T02:31:53.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-01-25T10:29:36.000Z (almost 8 years ago)
- Last Synced: 2024-10-05T20:47:33.182Z (about 1 month ago)
- Language: Thrift
- Size: 198 KB
- Stars: 34
- Watchers: 5
- Forks: 22
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# impala-ruby
[![build](https://travis-ci.org/colinmarc/impala-ruby.svg?branch=master)](https://travis-ci.org/colinmarc/impala-ruby) [![rubygems](https://badge.fury.io/rb/impala.svg)](http://rubygems.org/gems/impala)
This is a ruby client for [Cloudera Impala][1]. You use it like this:
```ruby
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:
```ruby
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
endconn.close
```[1]: https://ccp.cloudera.com/display/IMPALA10BETADOC/Introducing+Cloudera+Impala