suhrm1 opened a new issue #2336:
URL: https://github.com/apache/drill/issues/2336
**Is your feature request related to a problem? Please describe.**
Hi all,
I just started out evaluating Drill for querying RDBMS and JSON document
store (CouchDB) at the same time. Connecting to the CouchDB REST API gives me a
bit of a headache though:
I set up the **http storage plugin** to connect to my CouchDB webservice
[`{db}/_find`
endpoint](http://vm18212.virt.gwdg.de:8008/_utils/docs/api/database/find.html)
which allows to query documents. The query parameters need to be supplied as
JSON "selector" object in the Post body ([CouchDB selector
syntax](http://vm18212.virt.gwdg.de:8008/_utils/docs/api/database/find.html#find-selectors)).
My experiments and the
[docs](https://drill.apache.org/docs/http-storage-plugin/) tell me, that it is
not possible to pass a JSON object as the `postBody` parameter of a http
storage plugin connection though:
> postBody: Contains data, in the form of key value pairs, which are sent
during a POST request. The post body should be in the of a block of text with
key/value pairs: (...)
**Describe the solution you'd like**
Instead of only accepting key=value pairs in plain text as content of the
`postBody`, allow full JSON object support.
Maybe this is already possible somehow? If so, I would greatly appreciate a
quick pointer in the right direction.
Best regards,
Markus
---
My plugin config:
```json
{
"type": "http",
"connections": {
"couch": {
"url": "http://thisismyhost.url:8080/medic/_find",
"method": "POST",
"headers": {
"Content-Type": "application/json"
},
"authType": "basic",
"userName": "user",
"password": "password",
"postBody": "selector={\"_id\":{\"$gt\":0}}",
"params": null,
"dataPath": "docs",
"requireTail": false,
"inputType": "json",
"xmlDataLevel": 1
}
},
"proxyType": "direct",
"enabled": true
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]