You can translate the question and the replies:

Use of @WHEREEXPRESSION in REST API deployment

I'm having troubles deploying a RESTAPI that is built on a base view with a @WHEREEXPRESSION The following is an example of what I am trying to do and have tried. Create a base view with the following query: `Select * from tablename.schema where variable = @WHEREEXPRESSION` When deploying this query, `WHEREEXPRESSION` is not treated as a valid variable for the REST API query. I am also using a JDBC DB2 driver to connect to the source.
user
13-07-2023 01:59:58 -0400
code

1 Answer

Hi, @WHEREEXPRESSION is a special interpolation variable that is replaced at runtime by VDP with the where condition sent to the base view. There's a very good explanation in this KB article: [USING THE CREATE BASE VIEW FROM QUERY OPTION](https://community.denodo.com/kb/en/view/document/Using%20the%20Create%20Base%20View%20From%20Query%20Option). Usually it is used directly after a WHERE statement, e.g.: ``` SELECT <field_list> FROM <source_table_name> WHERE @WHEREEXPRESSION ``` In alternative you can use a normal Interpolation variable (my_param) with the following syntax: ``` SELECT <field_list> FROM <source_table_name> WHERE <field_name> = @my_param ``` After fixing your Base View query syntax you should be able to access the REST web service by specifying a where condition (first case) or a value for the variable (second case). Hope this helps
Denodo Team
14-07-2023 04:28:14 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here