You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Carol Bourgade <cj...@gmail.com> on 2014/12/09 17:54:30 UTC

drill rest interface

I am interested in writing a web app using REST and drill to query  json
files, HBase... Where can I find more information about the drill REST
interface?
Does the Drill Rest interface  accept  application/json content type  ?

Re: drill rest interface

Posted by Carol McDonald <cm...@maprtech.com>.
Drill Rest query and response example in these images:

https://www.dropbox.com/s/fe16oqhjtheur4z/drill2unnamed.png?dl=0

https://www.dropbox.com/s/d9z7tf8o9w1zb1w/drillunnamed.png?dl=0

On Tue, Dec 9, 2014 at 3:28 PM, Carol McDonald <cm...@maprtech.com>
wrote:

> here is an example
>
> [image: Inline image 1]
>
> [image: Inline image 2]
>
> On Tue, Dec 9, 2014 at 12:16 PM, Yash Sharma <ya...@gmail.com> wrote:
>
>> Hi Carol,
>> Drill has a rest interface which works on JSON. You can check the Drill
>> web
>> interface at http://localhost:8047/status when the Drillbit is running.
>> It
>> would be great if you would like to enhance the interface.
>>
>> You can also check out DrillRoot.java for little more implementation
>> details:
>>
>> https://github.com/apache/drill/blob/9e164662f5296f7048c880c40bc551030fb58cca/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRoot.java
>>
>> Please feel free to join the Drill Hangout today - 10am PDT (Tuesday)
>> where
>> we can discuss areas that you are interested in.
>>
>> Good luck Drilling !!
>>
>> On Tue, Dec 9, 2014 at 10:32 PM, prasanna pradhan <pr...@datarpm.com>
>> wrote:
>>
>> > This should help
>> >
>> > https://docs.google.com/document/d/1mRsuWk4Dpt6ts-
>> > jQ6ke3bB30PIwanRiCPfGxRwZEQME/edit
>> >
>> >
>> > On Tuesday 09 December 2014 10:24 PM, Carol Bourgade wrote:
>> >
>> >> I am interested in writing a web app using REST and drill to query
>> json
>> >> files, HBase... Where can I find more information about the drill REST
>> >> interface?
>> >> Does the Drill Rest interface  accept  application/json content type  ?
>> >>
>> >>
>> >
>>
>
>

Re: drill rest interface

Posted by Carol McDonald <cm...@maprtech.com>.
On Tue, Dec 9, 2014 at 3:28 PM, Carol McDonald <cm...@maprtech.com>
wrote:

> here is an example
>
> On Tue, Dec 9, 2014 at 12:16 PM, Yash Sharma <ya...@gmail.com> wrote:
>
>> Hi Carol,
>> Drill has a rest interface which works on JSON. You can check the Drill
>> web
>> interface at http://localhost:8047/status when the Drillbit is running.
>> It
>> would be great if you would like to enhance the interface.
>>
>> You can also check out DrillRoot.java for little more implementation
>> details:
>>
>> https://github.com/apache/drill/blob/9e164662f5296f7048c880c40bc551030fb58cca/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRoot.java
>>
>> Please feel free to join the Drill Hangout today - 10am PDT (Tuesday)
>> where
>> we can discuss areas that you are interested in.
>>
>> Good luck Drilling !!
>>
>> On Tue, Dec 9, 2014 at 10:32 PM, prasanna pradhan <pr...@datarpm.com>
>> wrote:
>>
>> > This should help
>> >
>> > https://docs.google.com/document/d/1mRsuWk4Dpt6ts-
>> > jQ6ke3bB30PIwanRiCPfGxRwZEQME/edit
>> >
>> >
>> > On Tuesday 09 December 2014 10:24 PM, Carol Bourgade wrote:
>> >
>> >> I am interested in writing a web app using REST and drill to query
>> json
>> >> files, HBase... Where can I find more information about the drill REST
>> >> interface?
>> >> Does the Drill Rest interface  accept  application/json content type  ?
>> >>
>> >>
>> >
>>
>
>

Re: drill rest interface

Posted by Ted Dunning <te...@gmail.com>.
Carol,

I think that you need to put links to images in apache emails.  Attachments
are typically stripped for security reasons.



On Tue, Dec 9, 2014 at 1:46 PM, Carol McDonald <cm...@maprtech.com>
wrote:

> Here is an example using the drill sandbox
>
> curl \
> > --header "Content-type: application/json" \
> > --request POST \
> > --data '{
> >   "queryType" : "SQL",
> >   "query" : "select t.user_info.cust_id as custid, t.user_info.device as
> device,t.user_info.state as state from dfs.clicks.`clicks/clicks.json` t
> limit 5"
> > }' \
> > http://192.168.48.129:8047/query.json
> [ {
>   "state" : "il",
>   "device" : "IOS5",
>   "custid" : 22526
> }, {
>   "state" : "nc",
>   "device" : "AOS4.2",
>   "custid" : 16368
> }, {
>   "state" : "oh",
>   "device" : "IOS6",
>   "custid" : 21449
> }, {
>   "state" : "oh",
>   "device" : "IOS5",
>   "custid" : 20323
> }, {
>   "state" : "ca",
>   "device" : "IOS5",
>   "custid" : 15360
> } ]
>
>
> On Tue, Dec 9, 2014 at 3:28 PM, Carol McDonald <cm...@maprtech.com>
> wrote:
>
>> here is an example
>>
>> [image: Inline image 1]
>>
>> [image: Inline image 2]
>>
>> On Tue, Dec 9, 2014 at 12:16 PM, Yash Sharma <ya...@gmail.com> wrote:
>>
>>> Hi Carol,
>>> Drill has a rest interface which works on JSON. You can check the Drill
>>> web
>>> interface at http://localhost:8047/status when the Drillbit is running.
>>> It
>>> would be great if you would like to enhance the interface.
>>>
>>> You can also check out DrillRoot.java for little more implementation
>>> details:
>>>
>>> https://github.com/apache/drill/blob/9e164662f5296f7048c880c40bc551030fb58cca/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRoot.java
>>>
>>> Please feel free to join the Drill Hangout today - 10am PDT (Tuesday)
>>> where
>>> we can discuss areas that you are interested in.
>>>
>>> Good luck Drilling !!
>>>
>>> On Tue, Dec 9, 2014 at 10:32 PM, prasanna pradhan <pr...@datarpm.com>
>>> wrote:
>>>
>>> > This should help
>>> >
>>> > https://docs.google.com/document/d/1mRsuWk4Dpt6ts-
>>> > jQ6ke3bB30PIwanRiCPfGxRwZEQME/edit
>>> >
>>> >
>>> > On Tuesday 09 December 2014 10:24 PM, Carol Bourgade wrote:
>>> >
>>> >> I am interested in writing a web app using REST and drill to query
>>> json
>>> >> files, HBase... Where can I find more information about the drill REST
>>> >> interface?
>>> >> Does the Drill Rest interface  accept  application/json content type
>>> ?
>>> >>
>>> >>
>>> >
>>>
>>
>>
>

Re: drill rest interface

Posted by Carol McDonald <cm...@maprtech.com>.
Here is an example using the drill sandbox

curl \
> --header "Content-type: application/json" \
> --request POST \
> --data '{
>   "queryType" : "SQL",
>   "query" : "select t.user_info.cust_id as custid, t.user_info.device as
device,t.user_info.state as state from dfs.clicks.`clicks/clicks.json` t
limit 5"
> }' \
> http://192.168.48.129:8047/query.json
[ {
  "state" : "il",
  "device" : "IOS5",
  "custid" : 22526
}, {
  "state" : "nc",
  "device" : "AOS4.2",
  "custid" : 16368
}, {
  "state" : "oh",
  "device" : "IOS6",
  "custid" : 21449
}, {
  "state" : "oh",
  "device" : "IOS5",
  "custid" : 20323
}, {
  "state" : "ca",
  "device" : "IOS5",
  "custid" : 15360
} ]


On Tue, Dec 9, 2014 at 3:28 PM, Carol McDonald <cm...@maprtech.com>
wrote:

> here is an example
>
> [image: Inline image 1]
>
> [image: Inline image 2]
>
> On Tue, Dec 9, 2014 at 12:16 PM, Yash Sharma <ya...@gmail.com> wrote:
>
>> Hi Carol,
>> Drill has a rest interface which works on JSON. You can check the Drill
>> web
>> interface at http://localhost:8047/status when the Drillbit is running.
>> It
>> would be great if you would like to enhance the interface.
>>
>> You can also check out DrillRoot.java for little more implementation
>> details:
>>
>> https://github.com/apache/drill/blob/9e164662f5296f7048c880c40bc551030fb58cca/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRoot.java
>>
>> Please feel free to join the Drill Hangout today - 10am PDT (Tuesday)
>> where
>> we can discuss areas that you are interested in.
>>
>> Good luck Drilling !!
>>
>> On Tue, Dec 9, 2014 at 10:32 PM, prasanna pradhan <pr...@datarpm.com>
>> wrote:
>>
>> > This should help
>> >
>> > https://docs.google.com/document/d/1mRsuWk4Dpt6ts-
>> > jQ6ke3bB30PIwanRiCPfGxRwZEQME/edit
>> >
>> >
>> > On Tuesday 09 December 2014 10:24 PM, Carol Bourgade wrote:
>> >
>> >> I am interested in writing a web app using REST and drill to query
>> json
>> >> files, HBase... Where can I find more information about the drill REST
>> >> interface?
>> >> Does the Drill Rest interface  accept  application/json content type  ?
>> >>
>> >>
>> >
>>
>
>

Re: drill rest interface

Posted by Carol McDonald <cm...@maprtech.com>.
here is an example

[image: Inline image 1]

[image: Inline image 2]

On Tue, Dec 9, 2014 at 12:16 PM, Yash Sharma <ya...@gmail.com> wrote:

> Hi Carol,
> Drill has a rest interface which works on JSON. You can check the Drill web
> interface at http://localhost:8047/status when the Drillbit is running. It
> would be great if you would like to enhance the interface.
>
> You can also check out DrillRoot.java for little more implementation
> details:
>
> https://github.com/apache/drill/blob/9e164662f5296f7048c880c40bc551030fb58cca/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRoot.java
>
> Please feel free to join the Drill Hangout today - 10am PDT (Tuesday) where
> we can discuss areas that you are interested in.
>
> Good luck Drilling !!
>
> On Tue, Dec 9, 2014 at 10:32 PM, prasanna pradhan <pr...@datarpm.com>
> wrote:
>
> > This should help
> >
> > https://docs.google.com/document/d/1mRsuWk4Dpt6ts-
> > jQ6ke3bB30PIwanRiCPfGxRwZEQME/edit
> >
> >
> > On Tuesday 09 December 2014 10:24 PM, Carol Bourgade wrote:
> >
> >> I am interested in writing a web app using REST and drill to query  json
> >> files, HBase... Where can I find more information about the drill REST
> >> interface?
> >> Does the Drill Rest interface  accept  application/json content type  ?
> >>
> >>
> >
>

Re: drill rest interface

Posted by Yash Sharma <ya...@gmail.com>.
Hi Carol,
Drill has a rest interface which works on JSON. You can check the Drill web
interface at http://localhost:8047/status when the Drillbit is running. It
would be great if you would like to enhance the interface.

You can also check out DrillRoot.java for little more implementation
details:
https://github.com/apache/drill/blob/9e164662f5296f7048c880c40bc551030fb58cca/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/DrillRoot.java

Please feel free to join the Drill Hangout today - 10am PDT (Tuesday) where
we can discuss areas that you are interested in.

Good luck Drilling !!

On Tue, Dec 9, 2014 at 10:32 PM, prasanna pradhan <pr...@datarpm.com>
wrote:

> This should help
>
> https://docs.google.com/document/d/1mRsuWk4Dpt6ts-
> jQ6ke3bB30PIwanRiCPfGxRwZEQME/edit
>
>
> On Tuesday 09 December 2014 10:24 PM, Carol Bourgade wrote:
>
>> I am interested in writing a web app using REST and drill to query  json
>> files, HBase... Where can I find more information about the drill REST
>> interface?
>> Does the Drill Rest interface  accept  application/json content type  ?
>>
>>
>

Re: drill rest interface

Posted by prasanna pradhan <pr...@datarpm.com>.
I think I got this link from one of the drill bug posts. Please feel 
free to share.

Thanks,
Prasanna

On Tuesday 09 December 2014 10:44 PM, Tomer Shiran wrote:
> Prasanna,
>
> This could help many folks out there. Can I post this document on the Drill
> blog (drill.apache.org/blog)?
>
> Thanks,
> Tomer
>
> On Tue, Dec 9, 2014 at 9:02 AM, prasanna pradhan <pr...@datarpm.com>
> wrote:
>
>> This should help
>>
>> https://docs.google.com/document/d/1mRsuWk4Dpt6ts-
>> jQ6ke3bB30PIwanRiCPfGxRwZEQME/edit
>>
>>
>> On Tuesday 09 December 2014 10:24 PM, Carol Bourgade wrote:
>>
>>> I am interested in writing a web app using REST and drill to query  json
>>> files, HBase... Where can I find more information about the drill REST
>>> interface?
>>> Does the Drill Rest interface  accept  application/json content type  ?
>>>
>>>


Re: drill rest interface

Posted by Tomer Shiran <ts...@gmail.com>.
Prasanna,

This could help many folks out there. Can I post this document on the Drill
blog (drill.apache.org/blog)?

Thanks,
Tomer

On Tue, Dec 9, 2014 at 9:02 AM, prasanna pradhan <pr...@datarpm.com>
wrote:

> This should help
>
> https://docs.google.com/document/d/1mRsuWk4Dpt6ts-
> jQ6ke3bB30PIwanRiCPfGxRwZEQME/edit
>
>
> On Tuesday 09 December 2014 10:24 PM, Carol Bourgade wrote:
>
>> I am interested in writing a web app using REST and drill to query  json
>> files, HBase... Where can I find more information about the drill REST
>> interface?
>> Does the Drill Rest interface  accept  application/json content type  ?
>>
>>
>

Re: drill rest interface

Posted by prasanna pradhan <pr...@datarpm.com>.
This should help

https://docs.google.com/document/d/1mRsuWk4Dpt6ts-jQ6ke3bB30PIwanRiCPfGxRwZEQME/edit

On Tuesday 09 December 2014 10:24 PM, Carol Bourgade wrote:
> I am interested in writing a web app using REST and drill to query  json
> files, HBase... Where can I find more information about the drill REST
> interface?
> Does the Drill Rest interface  accept  application/json content type  ?
>