You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by MohammadReza Mofateh <mo...@gmail.com> on 2014/10/20 14:32:49 UTC

Json Query on Hbase

Hi
I'm tried query on json in an hbase Table but It didn't return me result(it
was null) also I couldn't update storage/hbase?
How I can solve it?
Best

Re: Json Query on Hbase

Posted by MohammadReza Mofateh <mo...@gmail.com>.
Hi Mufeed.
Thank You.
1-Drill Version 0.5.0 and Hbase 0.94.16.But I should to update to 0.98.x Do
you know When 0.98.x compatible release?
2- I have a table "test",cf "i",cq "json".
My JSON object is: {"id":"1","name":"Ahmad"}
My query is: select test.i.json.id from hbase.test.

Also I tried with "convert_from" function but It's doesn't work with
JSON(or the others like UTF8) as this error:

Query failed: Failure while parsing sql. Column 'JSON' not found in any
table [fc97df4d-4af9-4323-9063-b2437c712aff]

By this query:

select c.name from(select convert_from(jsontable.json.json,JSON)c from
hbase.test)

3-When I add plugin json in Drill GUI in watch invalid error.

4-Now we run in embedded mode but in near future we run It in a cluster.

Note that I code with Java api:
        Class.forName("org.apache.drill.jdbc.Driver");//Drill Driver
        Connection con =
DriverManager.getConnection("jdbc:drill:zk=localhost:2181");//Connect jdbc
by ZK

Best
MohammadrezaMofateh


On Mon, Oct 20, 2014 at 4:20 PM, mufy <mu...@gmail.com> wrote:

> Hello Mohammad,
>
> What version of Drill are you using? And HBase version?
>
> What exactly is your JSON query? And will you please post a sample of the
> command executed?
>
> What is the error you're getting on adding the storage plugin for HBase?
>
> And, are you running this in an embedded (single node) or clustered mode?
> What is your cluster setup?
>
>
> ---
> Mufeed Usman
> My LinkedIn <http://www.linkedin.com/pub/mufeed-usman/28/254/400> | My
> Social Cause <http://www.vision2016.org.in/> | My Blogs : LiveJournal
> <http://mufeed.livejournal.com>
>
>
>
>
> On Mon, Oct 20, 2014 at 6:02 PM, MohammadReza Mofateh <mofateh72@gmail.com
> >
> wrote:
>
> > Hi
> > I'm tried query on json in an hbase Table but It didn't return me
> result(it
> > was null) also I couldn't update storage/hbase?
> > How I can solve it?
> > Best
> >
>

Re: Json Query on Hbase

Posted by mufy <mu...@gmail.com>.
Hello Mohammad,

What version of Drill are you using? And HBase version?

What exactly is your JSON query? And will you please post a sample of the
command executed?

What is the error you're getting on adding the storage plugin for HBase?

And, are you running this in an embedded (single node) or clustered mode?
What is your cluster setup?


---
Mufeed Usman
My LinkedIn <http://www.linkedin.com/pub/mufeed-usman/28/254/400> | My
Social Cause <http://www.vision2016.org.in/> | My Blogs : LiveJournal
<http://mufeed.livejournal.com>




On Mon, Oct 20, 2014 at 6:02 PM, MohammadReza Mofateh <mo...@gmail.com>
wrote:

> Hi
> I'm tried query on json in an hbase Table but It didn't return me result(it
> was null) also I couldn't update storage/hbase?
> How I can solve it?
> Best
>