You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by jose luis <jl...@hotmail.com> on 2018/05/19 18:16:40 UTC

drill help

Hello Drill, I'm new to using drill but I want to learn everything, my specific question is:
I want to make a query from postman (https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en) using the get method to consult a csv and to return an answer? but so far I see in the documentation of drill only information on web console or through curl ?, but I would like to cosume an api, thank you very much.


jose luis

Re: drill help

Posted by Bridget Bevens <bb...@mapr.com>.
Hello!


We've posted the instructions for using Postman on the Apache Drill site at https://drill.apache.org/docs/use-postman-to-run-sql-queries-on-drill-data-sources/.


All the best,

Bridget

________________________________
From: Robert Wu <rw...@magnitude.com>
Sent: Saturday, May 19, 2018 2:02:39 PM
To: dev@drill.apache.org
Cc: usuario@drill.apache.org; user-subscribe@drill.apache.org; dev-subscribe@drill.apache.org
Subject: Re: drill help

Hi Jose,

Yes, you should be able to use Postman to query through the REST apis.

In your Postman:
1. set the type to “POST” and enter the request URL as “http://<your drillbit ip>:8047/query.json”

2. In the Header tab, add an entry for “Content-Type” as key and “application/json” as value

3. In the Body tab, select “raw” and a new dropdown list should appear next to “binary" and on the dropdown select “JSON (application/JSON)”

4. And in the Body box, enter your request body in JSON format
{
“queryType”: “SQL”,
“query”: “select * from `dfs.root`.`test.csv`”
}

5. Press send!

Best regards,

Rob

On May 19, 2018, at 11:16 AM, jose luis <jl...@hotmail.com>> wrote:

Hello Drill, I'm new to using drill but I want to learn everything, my specific question is:
I want to make a query from postman (https://urldefense.proofpoint.com/v2/url?u=https-3A__chrome.google.com_webstore_detail_postman_fhbjgbiflinjbdggehcddcbncdddomop-3Fhl-3Den&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=0XmzfjL9vt5bGxgotAi0Uv3orlbVZgZbc24AMF97-R8&m=pb86fy1TXkt7yihlFGajVeN_hMgNeAePUdsUOGWbWxI&s=juD2O9wflpNe8PiYlWOdU_JT8QQgtQ1vkPDbgrBmx7I&e=) using the get method to consult a csv and to return an answer? but so far I see in the documentation of drill only information on web console or through curl ?, but I would like to cosume an api, thank you very much.


jose luis


Re: drill help

Posted by Robert Wu <rw...@magnitude.com>.
Hi Jose,

Yes, you should be able to use Postman to query through the REST apis.

In your Postman:
1. set the type to “POST” and enter the request URL as “http://<your drillbit ip>:8047/query.json”

2. In the Header tab, add an entry for “Content-Type” as key and “application/json” as value

3. In the Body tab, select “raw” and a new dropdown list should appear next to “binary" and on the dropdown select “JSON (application/JSON)”

4. And in the Body box, enter your request body in JSON format
{
“queryType”: “SQL”,
“query”: “select * from `dfs.root`.`test.csv`”
}

5. Press send!

Best regards,

Rob

On May 19, 2018, at 11:16 AM, jose luis <jl...@hotmail.com>> wrote:

Hello Drill, I'm new to using drill but I want to learn everything, my specific question is:
I want to make a query from postman (https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en) using the get method to consult a csv and to return an answer? but so far I see in the documentation of drill only information on web console or through curl ?, but I would like to cosume an api, thank you very much.


jose luis