LYCJeff opened a new pull request, #2747:
URL: https://github.com/apache/drill/pull/2747

   # [DRILL-8393](https://issues.apache.org/jira/browse/DRILL-8393): Allow 
parameters to be passed to headers through SQL in WHERE clause
   
   ## Description
   
   Allow parameters to be passed to headers through SQL in WHERE clause. Use 
the _params_ configuration item to control what parameters are allowed in, 
passing them into the body and header depending on the prefix.
   
   Config:
   `{ "url": "https://api.sunrise-sunset.org/json";, "requireTail": false, 
"params": ["body.lat", "body.lng", "body.date", "header.header1"], 
"parameterLocation": "json_body" }`
    
   SQL Query:
   ```
   SELECT * FROM api.sunrise
   WHERE `body.lat` = 36.7201600
   AND `body.lng` = -4.4203400
   AND `body.date` = '2019-10-02'
   AND `header.header1` = 'value1';
   ```
    
   Post body:
   `{ "lat": 36.7201600, "lng": -4.4203400, "date": "2019-10-02"}`
    
   Headers:
   `{ "header1": "value1", ……}`
   
   ## Documentation
   The _params_ configuration mode and SQL parameter passing mode need to be 
described in the document.
   
   ## Testing
   The _params_ configuration and SQL in the original unit test have been 
changed and have passed this part of the unit test.
   


-- 
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-unsubscr...@drill.apache.org

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

Reply via email to