You can translate the question and the replies:

JSON parameter with OR condition

Team, We are creating datasource going into Datasource -> Json and creating datasource connection and creating base view from API 1) We are succesfully able to create Datasource the connection passing below credentials DATA route: HTTP Client HTTP Menthod: GET URL:http://servername/metadata?pageNumber=0&pageSize=@{pageSize}&docNumber=@{docNumber}&status=For%20Approval Authentication:off 2) We have created base view from datasource connection We have to pass two parameter values @{pageSize} and @{docNumber} in order to get result of the baseview. Question: How to set parameter with or condition; If we pass only one parameter it should allow to create the view? Thanks DP
27-04-2017 16:17:21 -0400

1 Answer

Hi DP, To make the optional parameter work you can use the interpolation variable in the “post body” of the HTTP Client route by selecting the POST Request instead of GET request option. If you want to send a GET request you have to specify the values while creating the base view. Whereas, when you select the POST request, VDP has the option of using interpolation function called “ExecuteIfIsNotNull” which you can use it in the post body. You can also create a derived view to add a view parameter, for example view parameter called page_size_input with default value 100 and then add a "Where Condition" like "pageSize = page_size_input", so if you don't provide a value for "page_size_input" it will use the default value 100, but if you provide it, it will use the provided one as input. To know more about view parameters and how the interpolation variables work read the sections”*Using the WHEREEXPRESSION variable*” and “*Parameters of Derived Views*” of the** Virtual DataPort Administration Guide.** Hope this helps.
Denodo Team
08-05-2017 06:16:48 -0400
You must sign in to add an answer. If you do not have an account, you can register here