No commit activity in last 3 years
No release in over 3 years
SQL to HBase parser using Treetop (output based on Thrift). Doing all this before it was cool.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0.1.1
~> 4.0.0
>= 0

Runtime

 Project Readme

hipster_sql_to_hbase logo

Hipster SQL To HBase Code Climate Code Climate

parsing sql to hbase (thrift) before it was cool

This project was born out of the need to migrate rapidly and efficiently a MySQL based application over to Hadoop's own HBase.

The HipsterSqlToHbase module provides the ability to produce Thrift compatible queries for HBase from SQL valid statements and execute them; and as if that wasn't cool enough I've also incorporated methods which give you access to each step of the transformation process, as in, the Treetop syntax tree, and the hashed parsing output relevant to each of the following query types:

  • CREATE type queries
  • SHOW type queries
  • INSERT type queries
  • SELECT type queries
  • UPDATE type queries
  • DROP/DELETE type queries

Getting Started

You can install it via RubyGems:

$ gem install hipster_sql_to_hbase

Usage

This is a no bullshit, straight as an arrow, to the point gem.

Simply require the gem and execute your SQL query. It's that simple:

require 'hipster_sql_to_hbase'

HipsterSqlToHbase.execute("INSERT INTO users (user,pass) VALUES ('andy','w00dy'),('zaphod','b33bl3br0x')",'www.my-hbase-server.com',9090)

And boom! You've got your result; which varies depending on the SQL query type you executed (i.e. SELECT, INSERT, etc).

Complexity

This gem provides a wide array of functionalities besides just parsing SQL to HBase (Thrift).

I'll eventually get around to listing some of the awesomeness withheld within these humble lines of code (especially as I play around with the gem and come up with some test cases), but in the meantime if you're curious about the added functionality of HipsterSqlToHbase, you'll surely want to checkout the RDoc I've generated and uploaded here.