[ 
https://issues.apache.org/jira/browse/CALCITE-4035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124473#comment-17124473
 ] 

Julian Hyde commented on CALCITE-4035:
--------------------------------------

The CSV adapter is an example adapter - intentionally small and simple, 
probably not suitable for production.

The file adapter was created from the CSV adapter and combined with the web 
adapter. Its capabilities are a superset of the CSV adapter.

I agree that filtering would be a new capability for the file adapter. But I 
disagree that it would be too complex to implement. Software engineering gives 
us techniques (e.g. planner rules) that compose.

I tried to find some standards or best practices and didn't find much. But it 
might be useful to allow people to specify a [URI 
template|https://tools.ietf.org/html/rfc6570] in their model.json.

> Adapter for REST interface with query or path parameters
> --------------------------------------------------------
>
>                 Key: CALCITE-4035
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4035
>             Project: Calcite
>          Issue Type: New Feature
>            Reporter: David Hait
>            Priority: Major
>
> A typical microservice with a REST interface will be queryable by an HTTP GET 
> with query parameters or path parameters, and return JSON.  It would be 
> useful to have an adapter that allows access to this sort of interface.  One 
> use case would be to allow a join between a database table and a table which 
> represents the interface.  SQL "where" items could be mapped to specific 
> query parameters or path parameters on the web API.
> So, for example,
> {{    SELECT * from service.MyEndpoint where id=123;}}
> could get translated into
> {{  GET http:/service/MyEndpoint/123}}
> or alternatively
> {{  GET [http://service/MyEndpoint?id=123]}}
>  The mapping between SQL terms and URL path would be specified in a model 
> file.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to