Socket
Book a DemoInstallSign in
Socket

terastream

Package Overview
Dependencies
Maintainers
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terastream

0.1.1
bundlerRubygems
Version published
Maintainers
4
Created
Source

Terastream

JRuby client to query data from the Teradata data warehouse. Used in your own programs as a gem or via the terasql cli. The client takes a middleware based approach to formatting query results and streaming data to an output location.

Bundled formatter and output middlewares support formatting results as

  • Ruby objects
  • JSON records
  • lines of CSV

and streaming results to

  • STDOUT
  • Kafka
  • Redis pub/sub

Installation

  • install JRuby (9.0.0.0 preferred)
  • Check out the repo
  • rake install
  • ????
  • profit

If it's been pushed to a gem server:

Add this line to your application's Gemfile:

gem 'terastream'

And then execute:

$ bundle

Or install it yourself as:

$ gem install terastream

Usage

If using Terastream in your own application:

client = Terastream.new do |connection|
  connection.username  = "something"
  connection.password  = "password"
  connection.hostname  = "somehost.somwhere"
  connection.formatter = Terastream::JsonBuilder
  connection.output    = Terastream::Output::Redis
end

results = client.query("SELECT * FROM sometable")
results.each do |result|
  p result.field
end

Or using the terasql command line utility

terasql --username username --password password --host somehost.somewhere --formatter json --output redis --query "SELECT * FROM sometable"

Todo

  • Support for Amazon Kinesis as a results destination
  • Support for DDL files being run before final query execution

Warning

ALPHA SOFTWARE!!!!!

Contributing

  • Fork it ( https://github.com/[my-github-username]/terastream/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

FAQs

Package last updated on 29 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.