You can translate the question and the replies:

Expression written on a column of a flatten view

Unable to get the expreession written on column of a flatten view from ***element_metadata*** table. I get the output for the column - "expression" as --> Flattened Field: "EX_LIST_array" Note: Base view has an array data set. We flatten the base view in derived view and write the expression on one of the BV(array) column. Denodo Version: 7.0
user
13-07-2020 07:02:10 -0400

1 Answer

Hi, I've been able to use the **COLUMN_DEPENDENCIES** built in stored procedure to get the expression of a calculated field in a flattened view. For example, I used a JSON file with the following contents: ```0 { "value": [ {"Field0": "Hello","Field1": "World"} ] } ``` After creating a base view 'bv_json' in the '**test**' database, I then created a flattened view '**iv_json_flatten**', with a new field, '**field2**', with a value of ```0 concat(field0, ' ', field1, '!') ``` Finally, I ran the VQL below in the VQL Shell of the VDP Administration Tool ```0 select expression from COLUMN_DEPENDENCIES('test','iv_json_flatten' ,'field2' ) where expression is not null ``` This returns the expression we built for '**field2**' in the flatten view '**iv_json_flatten**'. More information can be found in the [COLUMN_DEPENDENCIES](https://community.denodo.com/docs/html/browse/latest/vdp/vql/stored_procedures/predefined_stored_procedures/column_dependencies#column-dependencies) section of the Virtual DataPort VQL Guide. Hope this helps!
Denodo Team
16-07-2020 10:57:46 -0400
You must sign in to add an answer. If you do not have an account, you can register here