You can translate the question and the replies:

Adding prefix to a register subfields

Hello, I want to add a prefix to all register subfields. In my case I have a register of registers. For each subfield of the register i want to add a specific prefix depending on the position of the register in my schema. For example, I have a register Json, in which there is another register "form" and a second register "candidate". I want to add the same prefix "level0" to both "form" and "candidate" at once. In my case I have more than 50 sub register and it's hard to rename one by one. Thank you,
user
25-01-2023 13:03:21 -0500
code

3 Answers

Hi, It is possible to add a prefix to all register subfields in Denodo but by making a new view. To do this in the **Virtual DataPort Administration Tool**, you can create a new selection view from the view that contains the original register, navigate to the 'Output' tab, right click the register to project the subfields, click the checkboxes on the left side of the registers you want to rename and right click in the field to select ‘Rename select subfields by adding a prefix' and enter your desired prefix. Currently it is not possible to rename multiple subfields in an existing view. You can refer to the [Creating Selection Views](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/creating_selection_views/creating_selection_views) article in the **Virtual DataPort Administration Guide** for more information. Hope this helps!
Denodo Team
25-01-2023 19:46:18 -0500
code
Hi, Thank you for your answer. Actually, my issue is that I have fields with same name under the different registers. For example, under "form", I have the field "F1" and also under "candidate", I have the same field which is "F1". I want to create a final view, whith a column that combine all the values of the field "F1" wheather these values comes from the register "form" or any other register. For this reason, I wanted to add prefix to distinct between the different fields as first step, then combining them.. Is there any way to get this result with a more direct method? Thank you
user
26-01-2023 05:01:40 -0500
Hi, The most direct way to achieve the results would be to change the prefixes according to your requirements. Another option would be to analyze the VQL in a text editor and make the changes to the subfields according to your preferences and re-entering the VQL to recreate the view. You can refer to the [Exporting the Server Metadata](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/exporting_and_importing_the_server_metadata/exporting_the_server_metadata/exporting_the_server_metadata) article in the Virtual DataPort Administration Guide for more information. Hope this helps!
Denodo Team
30-01-2023 21:03:51 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here