You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2021/10/17 00:37:05 UTC

[GitHub] [drill] suhrm1 opened a new issue #2336: HTTP Storage Plugin: allow JSON in postBody

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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] cgivre commented on issue #2336: HTTP Storage Plugin: allow JSON in postBody

Posted by GitBox <gi...@apache.org>.
cgivre commented on issue #2336:
URL: https://github.com/apache/drill/issues/2336#issuecomment-947041347


   @suhrm1 
   One thing to point out is that there was some work two years ago about writing a storage plugin (connector) for Drill and CouchDB. [1]. (See link below). I don't know if the author is interested, but if you're interested in picking up where the author left off, that would be a welcome contribution to Drill. 
   
   [1]: https://github.com/LyleLeo/Apache-Drill-CouchDB-Storage-Plugin 


-- 
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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] cgivre closed issue #2336: HTTP Storage Plugin: allow JSON in postBody

Posted by GitBox <gi...@apache.org>.
cgivre closed issue #2336:
URL: https://github.com/apache/drill/issues/2336


   


-- 
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: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org