You can translate the question and the replies:

Searching on fields that will be nested on outbound and support the 'in' operation in web service

We have a Denodo service we want to create but have ran into some issues while creating it. The customer required a few things for this service. A default set of parameters if they don't send any themselves, which we are using the 'ExecuteIfIsNotNull' in conjunction with @WHEREEXPRESSION to solve. e.g. they want field1 in ('1',2','3') and field2 in ('a','b'). They also require that that outbount format to use nesting. Note, the fields that they want to search on are inside the nest. It seems in order to allow searching on these fields we also had to expose those throughout the view outside the array that is generated. This causes a problem though because these parameters become part of the "group by" and start to divide an array into multiple records instead of all contained in 1 array. Example, they are searching for the following, size in('large', 'medium') and state in('NY'). Instead of nesting in 1 group, it will create 2 arrays, 1 for large/NY and 1 for medium/NY. If I remove the fields so they not also at the parent level, thus they are removed from the group by but they are not searchable now, it correctly nests them all into 1 array. Basically is there a way to expose certain fields to be searchable in a nest that will allow multiple values for the same field be searched on at the same by, but not create multiple arrays.
07-06-2017 07:24:32 -0400

3 Answers

Hi,   I would do the following to enable searching records with values that match to the fields inside a nest variable.   1. Specify view parameters for the web service by editing its derived view. You can find this under ‘Edit > Model > View Parameters’ 1. Then specify condition(s) in the ‘Where conditions’ tab to match the field inside nested variable with this parameter. 1. Redeploy the web service and search for the required values.   You can refer to the [Parameters of Derived views](  section for more information on this.   If you are a customer with a valid support user, I recommend that you open a Service Request in support site, so that the support team can help you better.   Hope this helps!
Denodo Team
09-06-2017 04:37:27 -0400
When I use parameters it still breaks the nesting so that the exposed parameters when allowing 'in' operator is creating extra subgroups based on those parameters.
14-06-2017 18:16:23 -0400
Hi, If you want to get data using the ‘IN’ operator, I would recommend you to use the **$filter** conditions, to filter your required values. Assuming, **input_country** and **input_size** are your two parameters, then you may achieve your conditions like below, *<YOUR-VIEW-REST-URL>?$filter=(inputcountry in ('NY','EU')) and (inputsize in ('small','large'))* You may also refer to the [RESTful web service - Representations]( of the Virtual DataPort Administration Guide for more information. Hope this helps!
Denodo Team
19-06-2017 07:51:25 -0400
You must sign in to add an answer. If you do not have an account, you can register here