You can translate the question and the replies:

How to update the derived view DESCRIPTION. We have a excel file which has field name and description . How to update the description field

How to update the derived view DESCRIPTION. We have a excel file which has field name and description . How to update the description field
user
10-04-2020 17:15:52 -0400
code

3 Answers

Hi, I found that the Virtual Query Language (VQL) syntax will allow you to change the description of the field using the below syntax > ALTER VIEW <View_Name>( ALTER COLUMN <Field_Name> ADD ( DESCRIPTION = '<Your Description>' ) ) With that, I can go ahead and automate updating the description using the Scheduler, here is the brief outline of the steps, * To read the column name and description to the read from the excel: Create a view over the excel sheet you have with the column name and description. You can refer to the [Excel Sources](https://community.denodo.com/docs/html/browse/latest/vdp/administration/creating_data_sources_and_base_views/excel_sources/excel_sources) section of the Virtual DataPort Administration Guide for more information. You could also refer to this [tutorial](https://community.denodo.com/tutorials/browse/bi/2virtualization1). * Create a scheduler job for the above statement as parameterized query, You can read more about creating the Denodo Scheduler Jobs from [Jobs](https://community.denodo.com/docs/html/browse/7.0/scheduler/administration/creating_and_scheduling_jobs/jobs/jobs) and [VDP Extraction Section](https://community.denodo.com/docs/html/browse/7.0/scheduler/administration/creating_and_scheduling_jobs/configuring_new_jobs/vdp_extraction_section#vdp-extraction-section) of the Scheduler Administration Guide > ALTER VIEW <View_Name>( ALTER COLUMN @inp_column ADD ( DESCRIPTION = '@description' ) ) * In the Non-Parameterized query section, you can issue below to retrieve the data created from the view on step 1. > select <column_name>, <column_description> from <base_view_over_excel> * Create the mapping on the job to map your column from the non-parameterized query with the parameter in the parameterized query. inp_column=<column_name> description=<column_description> You can run the job to update the description of all the columns in one go. Hope this helps!
Denodo Team
17-04-2020 01:09:54 -0400
code
where you put the mapping values? I have everything else set and not sure how to proceed.
user
13-04-2022 16:35:11 -0400
Hi, The option to create maps for the Parameterized Query and Query (non parameterized) columns is available till Denodo 7.0 under the New Source option of the Job Extraction section . Starting from Denodo 8.0, you can no longer create mappings between columns. Instead of creating mappings, you can alias the variable in your **Parameterized query** to have the same name as the column in the **Query (non parameterized)**. From above example, if I have configured the Parameterized query with interpolation variables like "@inp_column" and "@description", ``` ALTER VIEW <View_Name>( ALTER COLUMN @inp_column ADD ( DESCRIPTION = ‘@description’ ) ) ``` then I would format my Query (non parameterized) as something like the following: `select <column_name> as inp_column, <column_description> as description from <base_view_over_excel>` By doing so, the columns will be automatically mapped to each other. For more information, refer to the latest [VDP Extraction Section](https://community.denodo.com/docs/html/browse/latest/en/scheduler/administration/creating_and_scheduling_jobs/configuring_new_jobs/vdp_extraction_section#vdp-extraction-section) of the Scheduler Administration Guide. Hope this helps!
Denodo Team
15-04-2022 08:29:07 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here