[
https://issues.apache.org/jira/browse/DRILL-8393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17713350#comment-17713350
]
ASF GitHub Bot commented on DRILL-8393:
---------------------------------------
cgivre commented on code in PR #2747:
URL: https://github.com/apache/drill/pull/2747#discussion_r1169428023
##########
contrib/storage-http/README.md:
##########
@@ -138,11 +140,26 @@ key2=value2"
```
`postBodyLocation`: If the API uses the `POST` method, you can send
parameters in several different ways:
-* `query_string`: Parameters from the query are pushed down to the query
string. Static parameters are pushed to the post body.
Review Comment:
If the user enables this feature, are they required to specify the
destination of the supplied parameters? What happens if they don't?
##########
contrib/storage-http/README.md:
##########
@@ -15,6 +15,7 @@ To configure the plugin, create a new storage plugin, and add
the following conf
{
"type": "http",
"cacheResults": true,
+ "useLegacyRequestParamSyntax": false,
Review Comment:
See comment. I'd like to make the default behavior what Drill currently
does and have the user explicitly enable this functionality. Could we rename
this param `advanced` or `enhanced` and thus change the boolean to
`enableEnhancedParamSyntax`?
> Allow parameters to be passed to headers through SQL in WHERE clause
> --------------------------------------------------------------------
>
> Key: DRILL-8393
> URL: https://issues.apache.org/jira/browse/DRILL-8393
> Project: Apache Drill
> Issue Type: Improvement
> Components: Storage - HTTP
> Affects Versions: 1.20.0
> Reporter: Yuchen Liang
> Priority: Major
>
> Some APIs require parameters (e.g. digital signature) in the headers to be
> generated at access time.So I'm wondering if we can pass it in through filter
> statement.
> Perhaps we could design it like the params field in connections parameter.
> For example:
>
> 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", ……}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)