Can you post the script that you're using? Is this a client-side JavaScript?

On Sun, Aug 30, 2015 at 12:51 PM, Nira Amit <amitn...@gmail.com> wrote:

> Hello Drill developers,
> I'm implementing a module that reads data from Drill and feeds it into a
> visualization tool. I have a working embedded Drill installation with my
> data on it and when I query it with curl it works just fine:
>
> curl --header "Content-type: application/json" --request POST --data
> @post.json http://localhost:8047/query.json
>
> where post.json contatins:
> {"queryType" : "SQL", "query" : "select * from
>  vzb.dev.`/bigdata/parquet_basic_indicators` limit 1"}
>
> returns:
> {
>   "columns" : [ "TIME", "GEO", "GDP_PER_CAP", "LEX", "POP", "GEO_NAME",
> "GEO_CAT", "GEO_REGION" ],
>   "rows" : [ {
>     "GEO" : "world",
>     "POP" : "5858793283",
>     "GDP_PER_CAP" : "8780.9",
>     "GEO_NAME" : "World",
>     "GEO_CAT" : "planet",
>     "TIME" : "1990",
>     "GEO_REGION" : "\r",
>     "LEX" : "65.76"
>   } ]
> }
>
> however, if I try to invoke such a Post request from a script, I'm getting:
> XMLHttpRequest cannot load http://localhost:8047/query.json. Origin
> file://
> is not allowed by Access-Control-Allow-Origin.
>
> So my question is: can I configure the embedded server to accept the
> request? I can rebuild Drill in my local environment if necessary, I just
> need to know what to change in the code/configuration for it to work.
>
> Thanks!
> Nira.
>



-- 
Tomer Shiran

Reply via email to