You can translate the question and the replies:

Push down filter to JSON data source

Hi Team, I have a scenario where a REST API exposing large volume of data which required to be configured in Denodo as data source. We are able to achieve this by using JSON data souce and HTTP client. The data volume is high, hence filter conditions must be pushed down where applicable. The API provides $filter query parameter which can take complex where clause condition on JSON fields (similar to REST WS provided by Denodo). How to push the entire where clause on base view to JSON Data source on $filter query parameter? I tried with @WHEREEXPRESSION, but looks like it works only for JDBC data sources. Could you please let me know an alternative other than writing custom wrapper of our own? "select * from baseview where xyz = 1" should pushed down like http://apiendpoint?$filter=xyz%3D1 Thanks.
06-07-2021 18:16:47 -0400

3 Answers

Hi, you can refer to the similar case below: [Rest API as a Data Source with push down optimization]( Hope this helps!
Denodo Team
08-07-2021 03:03:44 -0400
Thanks. But its not quite the same. In case I have to push down a specific condition, ex: select * from baseview where xyz = 123, as http://apiendpoint?xyz=123, I would use @xyz as interpolation variable, in that case the JSON Datasource URL will be http://apiendpoint?xyz=@xyz. This works, but the scenario I mentioned is different. The API endpoint does not take the colum name as query parameter, instead it takes a generic "$filter" as a query parameter with complete where statement. Is it possible to use @WHEREEXPRESSION with JSON data source? Regards, Sripathi
08-07-2021 03:58:56 -0400
Hi, “@WHEREEXPRESSION” is used when you create a base view from JDBC or ODBC datasource. The variable replaces “@WHEREEXPRESSION” with predefined where conditions. You can find more details in the “WHEREEXPRESSION” section of the page below. [Using the Create Base View From Query Option]( For adding datasource-specific expressions for JSON data source, you can also use the POST BODY option. You can refer to the page below for more information. [Error creating JSON data source with "POST Body" parameters]( Hope this helps!
Denodo Team
15-07-2021 02:33:44 -0400
You must sign in to add an answer. If you do not have an account, you can register here