You can translate the question and the replies:

Applying Filter on the Register type data type column in Rest Api results via Api URL construction

Dear Denodo Support Team, We have created a Rest API end point web service for a Derived view and this derived view has REGISTER of REGISTER on elements. As we are trying to apply filters on literals and strings are working fine. But, cannot apply filter on Register elements. Could you please assist us with this issue. http://acme:9090/denodo-restfulws/.../views/view1?$filter='register_field=("f1":"value", "boolean_value": true)' Please suggest how to construct URLs for filtering on Register of Register type of columns. Regards, Srujan.
user
22-05-2019 16:13:26 -0400

1 Answer

Hi, To construct a URL you can get filter format from the WHERE condition of the VQL command. For example, if you have a register and want to filter it using just one value you can simply use the where clause, (register_field).f1=value The URL in this case can be: http://acme:9090/denodo-restfulws/.../views/view1?$filter=(register_field).f1=value If you want to filter using all of the register values you can use the WHERE clause format register_field = ROW('value1', 'value2', ‘value3’)) The URL, in this case, can be like this: http://acme:9090/denodo-restfulws/.../views/view1?$filter=register_field=ROW('value1', 'value2',’value3’) If you have a nested register register_field(value1, value2, register(reg_value1, reg_value2)) in your view you can access the view using the where condition like register_field=ROW(‘value1’, ‘value2’, ROW(‘reg_value1’, reg_value2)) The URL for this can be http://acme:9090/denodo-restfulws/.../views/view1?$filter=register_field=ROW(‘value1’, ‘value2’, ROW(‘reg_value1’, reg_value2)) To have some more examples you can refer to this document below https://community.denodo.com/docs/html/browse/7.0/vdp/vql/advanced_characteristics/management_of_compound_values/processing_of_compound_types_example Hope this helps!
Denodo Team
24-05-2019 19:15:42 -0400
You must sign in to add an answer. If you do not have an account, you can register here