drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Phillips <sphill...@maprtech.com>
Subject Re: insert and query from hbase table
Date Mon, 21 Apr 2014 17:32:38 GMT
You will need to put backticks around the column name, like so:

select `cf.a` from hbasetest.test;

The reason for this is currently that currently, without backticks, the
parser interprets cf as the table name.

insert statements are currently not supported.


On Mon, Apr 21, 2014 at 9:46 AM, Firas Khasawneh <kfiras@gmail.com> wrote:

> Hi all,
>
>
>
> I created a table in hbase and I tried to insert values and query from that
> table but I am not able to find how I can specify column family name in an
> insert or select statements. Below are more details:
>
>
>
> 0: jdbc:drill:schema=hbasetest> select * from hbasetest.test;
>
> +------------+------------+
>
> |  row_key   |    cf.a    |
>
> +------------+------------+
>
> | [B@c57cac7 | [B@57c1d525 |
>
> +------------+------------+
>
> 1 row selected (0.08 seconds)
>
>
>
>
>
> Select cf.a from hbasetest.test does not work I tried cf:a and nothing
> worked.
>
>
>
> insert into hbasetest.test values('row2','value2'); fails also/ I get the
> following message: "Failure while parsing sql. < ValidationException:[
> org.eigenbase.util.EigenbaseContextException: From line 1, column 23 to
> line 1, column 26 ] < EigenbaseContextException:[ From line 1, column 23 to
> line 1, column 26 ] < SqlValidatorException:[ Number of INSERT target
> columns (1) does not equal number of source items (2) ]"
>
>
>
> I tried many combinations but nothing worked. I am not able to find any
> docs also on sql syntax fro Drill.
>
>
>
> Thanks,
>
> Firas
>



-- 
 Steven Phillips
 Software Engineer

 mapr.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message