Apache HBase
Friday October 25, 2013
Comments:
Phoenix Guest Blog
James Taylor
I'm thrilled to be guest blogging today about Phoenix, a BSD-licensed open source SQL skin for HBase that powers the HBase use cases at Salesforce.com. As opposed to relying on map-reduce to execute SQL queries as other similar projects, Phoenix compiles your SQL query into a series of HBase scans, and orchestrates the running of those scans to produce regular JDBC result sets. On top of that, you can add secondary indexes to your tables to transform what would normally be a full table scan into a series of point gets (and we all know how good HBase performs with those).
To get started using phoenix, follow these directions:
$ bin/sqlline.sh localhost
create table stock_price(ticker varchar(6), price decimal, date date);
select * from stock_price;
select * from stock_price where ticker='CRM';
select ticker, avg(price) from stock_price
where date between current_date()-30 and current_date()
group by ticker;
Take a look at our recent announcement for our release which includes support for secondary indexing, peruse our FAQs and join our mailing list.
Posted at 09:03PM Oct 25, 2013
by stack in General |
|