There is a project called “optiq-web” (so-called because Calcite used to be 
called Optiq) that reads HTML tables via HTTP.

I have taken that project, updated it to a recent version of Calcite, and 
combined it with the file adapter (which is in Calcite as example/csv, and 
reads CSV and JSON data from files) to make something that can read CSV, JSON, 
HTML data from any URL (file or HTTP). You can see the work here: 
https://issues.apache.org/jira/browse/CALCITE-884 
<https://issues.apache.org/jira/browse/CALCITE-884>. It has a pull request that 
basically works.

The next step would be to have the adapter recognize filters and generate URIs 
accordingly. E.g. the filter ‘deptno = 50’ generates the URI 
‘http://my.example.com/sales/emp/query?deptno=50'.

You could pick up the work on CALCITE-884 and add filters as an extension.

Julian
 

> On Sep 1, 2016, at 9:26 AM, Potnuru, Gowtham Sen <[email protected]> 
> wrote:
> 
> Hi,
> 
> This is Gowtham. I am checking for options to come up with JDBC data adapter 
> on top of REST API based data sources. We have common REST API end point and 
> we have options to add tags like "filter", "group by" and so on to bring 
> specific data using simple REST API calls. We have got recommendations from 
> community that Calcite is feasible option for us where we can interact with 
> SQL and we can configure parsing the SQL to REST API url based on the 
> datasource specific language.
> 
> I have searched through Calcite site. But I am unable to find the good 
> starting point. I did leverage one example provide using DataFactory with 
> custom java objects to analyze using SQL. But we realized that, we need to 
> build multiple such objects. As I am looking for dynamic REST API generation 
> based on simple SQL query provided by user.
> 
> Could you please suggest if there any sample data adapter example to be 
> leveraged in this aspect? Please suggest.
> 
> Best Regards
> 
> Gowtham Sen Potnuru
> 

Reply via email to