Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Mauritz_SA
Partner - Specialist
Partner - Specialist

Add (custom) prefix to table columns

Hi all

Last year I asked a question about adding the same table twice in the Data Manager. I still haven't had any luck and reverted to doing it in the Data Load Editor (even though I still have a problem with self-service users who don't want to code, but I digress). I would like to know if it is possible to add a prefix (which is not the table name so I don't think Qualify * will work) to the columns?

For example my Assets table is the following:

Asset IdAsset CodeAsset Description
1123Pump
2154Truck

 

Which I get by doing something like

Load

*

From Assets.qvd;

I want to use the exact same qvd a second time as a Failed Assets table which has "Failed " appended to the original column names:

Failed Asset IdFailed Asset CodeFailed Asset Description
1123Pump
2154Truck

 

I don't want [Failed Assets.Failed Asset Id] which can be done by using Qualify *, but rather [Failed Asset Id] as is shown in the table above.

I need a generic solution as I need to do it with a Load * statement and there might be more columns added to the QVDs  over time (that obviously have more than 3 columns to start with Smiley Very Happy).

Regards,

Mauritz


FYI. My previous post about adding two tables is posted here as a reference:

https://community.qlik.com/t5/New-to-Qlik-Sense/Qlik-Sense-add-same-qvd-table-twice-in-Data-Manager/...

2 Replies
Anil_Babu_Samineni

Can't you use Alias? like

Asset:

Load [Asset ID], [Asset Code], [Asset Description] From T1;

[Failed Asset]:

Load [Asset ID] as [Failed Asset ID], [Asset Code] as [Failed Asset Code], [Asset Description] as [Failed Asset Description] From T1;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Mauritz_SA
Partner - Specialist
Partner - Specialist
Author

Hi Loveisfail

I have always enjoyed your username Smiley Very Happy.

I can do that yes, but my qvd will increase in number of columns over time so I would like to use a Load * from Assets.qvd so that it will grow dynamically as the qvd gets more dimensions (and I also don't want the dataload to fail if we delete a column in the qvd). I also don't only want to use it for Assets, there are other common tables that are linked to my data model more than once.

Qualify * would have worked if I could have defined the alias/prefix, but I would like to use clean names in the front end so appending the table name to the field isn't ideal.

Regards,

Mauritz