drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sreeparna bhabani <bhabani.sreepa...@gmail.com>
Subject Suggestion needed for REST API JSON response format
Date Tue, 14 Apr 2020 14:55:00 GMT
Hi Team,

We reach out to you for a specific help. I have given the details below.

*Situation :*
We have a Web UI which calls Apache Drill Query using REST API. Please find
below the sample call where we are querying *Parquet** file*.

curl -X POST -H "Content-Type: application/json" -d '{"queryType":"SQL",
"query": "select * from dfs.`sample*.parquet*`", "autoLimit":1}'
http://localhost:8047/query.json

*Problem : *
The response JSON is successfully received (sample below). There are few
columns which are of type Number in Parquet file, e.g - "sales".
{
   "columns" : [ "id", "name", "sales", ......... ],
   "rows" : [ {
     "id" : "0001",
     "sales" : "65",
     "name" : "XYZ",
    ................
   } ]
 }

But we are getting the Number values in  "" like highlighted above, which
is creating problem in Web UI.

*Expectation :*
We would need the same response with Number values without "", like below.
{
   "columns" : [ "id", "name", "sales", ......... ],
   "rows" : [ {
     "id" : "0001",
     "sales" : 65,
     "name" : "XYZ",
    ................
   } ]
 }

Please suggest us how to resolve the same.

Thanks in advance for your assistance.

*Sreeparna Bhabani*

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