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

David Hait commented on CALCITE-4035:
-------------------------------------

The thing about the file adapter is that the model would have to change 
significantly.  Firstly, you'd have to specify all the details about the 
mapping between filterable columns and the query or path parameters of the URL. 
 Secondly (I noticed this with our microservices), you might need to tweak the 
JSON which is returned to get a "table" out of it; for example when the 
microservice returns HAL-HATEOS and the data you want is "embedded".  I'm 
thinking the file adapter could be a good guide, but it might "pollute" the 
model with complexity for those who only want files if we add all this stuff in.

I'm afraid the level of my skills and availability are somewhat low to be able 
to contribute much to the development of this, but I'm happy to start taking a 
look at the dimensions of it if you all agree it's potentially worthwhile.  
Also [~donnyzone] do you have any concrete thoughts about what you have looked 
at or are looking at?

> 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