You can translate the question and the replies:

How to read field value from an array using VQL without flattening it.

Hi, I want to write a VQL to get any field value from an array without flattening it. How i can do it? I know how to get a field value from register. example for register: SELECT (REGISTER_NAME).FIELD_NAME from VIEW_NAME If there is a way get field value from array without flattening it, kindly let me know.
user
28-05-2021 06:09:22 -0400

1 Answer

Hi, Even if you do not want to create a flatten view, you can still use the FLATTEN operation to flatten an array. I used the following syntax to get the field values of an array. SELECT <column_name> FROM FLATTEN <view_name> AS <alias> (<alias>.<column_name>) The FLATTEN operation returns the fields of the source view— except the flattened array— and all the fields of the registers of the array field being flattened. For more information on this, you can refer to [FLATTEN View (Flattening Data Structures)](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/queries_select_statement/from_clause/flatten_view_flattening_data_structures) in the Virtual DataPort VQL Guide. Hope this helps!
Denodo Team
01-06-2021 20:24:58 -0400
You must sign in to add an answer. If you do not have an account, you can register here