[
https://issues.apache.org/jira/browse/DRILL-8393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yuchen Liang updated DRILL-8393:
--------------------------------
Description:
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:
{ "url": "https://api.sunrise-sunset.org/json", "requireTail": false,
"bodyParams": ["lat", "lng", "date"], "headerParams": ["signature"] }
SQL Query:
SELECT * FROM api.sunrise
WHERE `body.lat` = 36.7201600
AND `body.lng` = -4.4203400
AND `body.date` = '2019-10-02'
AND `header.signature` = 'xxxxx';
was:
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:
{
"url": "[https://api.sunrise-sunset.org/json]",
"requireTail": false,
"bodyParams": ["lat", "lng", "date"],
"headerParams": ["signature"]
}
SQL Query:
SELECT * FROM api.sunrise
WHERE `body.lat` = 36.7201600
AND `body.lng` = -4.4203400
AND `body.date` = '2019-10-02'
AND `header.signature` = 'xxxxx';
> Use some configuration items to specify the parameters as filters that allow
> them to be passed to headers through SQL
> ---------------------------------------------------------------------------------------------------------------------
>
> 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
> Fix For: 1.21.0
>
>
> 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:
> { "url": "https://api.sunrise-sunset.org/json", "requireTail": false,
> "bodyParams": ["lat", "lng", "date"], "headerParams": ["signature"] }
> SQL Query:
> SELECT * FROM api.sunrise
> WHERE `body.lat` = 36.7201600
> AND `body.lng` = -4.4203400
> AND `body.date` = '2019-10-02'
> AND `header.signature` = 'xxxxx';
--
This message was sent by Atlassian Jira
(v8.20.10#820010)