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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
aruneshgupta
Creator
Creator

Qlik Label mapping from defined seprate table

Hi All,

Can you pleae help me to get Label names from second table to replace IDs in the first table. 

Source : 

Name ID CID ZID
Arunesh 1001 2001 3001
Ramesh 2001 3001 40001
Nancy 5001 7001 6001

 

Map of label:

Field Label
ID ScreenId
CID CountryId
ZID ZoneID

 

output:

Name ScreenId CountryId ZoneID
Arunesh 1001 2001 3001
Ramesh 2001 3001 40001
Nancy 5001 7001 6001

 

I am having too many colums so lookng some some automated way in the script. 

Thanks in advance!

Best Regards,

Arunesh

3 Solutions

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

// Load the source table
LOAD * from source...;
// Load the fieldname mapping table
FieldMap:
Mapping LOAD Field, Label from mapping_source_file...;
// Rename existing fields using the Map
Rename Fields Using FieldMap;

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularS...

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

View solution in original post

Vegar
MVP
MVP

 

 The solution provided by @rwunderlich should work. Just a tiny adjustment. It's missing the mapping declaration that defines the table a mapping table.

 

 

// Load the source table

LOAD * from source...;

// Load the fieldname mapping table

FieldMap:

MAPPING LOAD Field, Label from mapping_source_file...;

// Rename existing fields using the Map

Rename Fields Using FieldMap;

View solution in original post

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Thanks for that edit!

-Rob

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

// Load the source table
LOAD * from source...;
// Load the fieldname mapping table
FieldMap:
Mapping LOAD Field, Label from mapping_source_file...;
// Rename existing fields using the Map
Rename Fields Using FieldMap;

https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularS...

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com

Vegar
MVP
MVP

 

 The solution provided by @rwunderlich should work. Just a tiny adjustment. It's missing the mapping declaration that defines the table a mapping table.

 

 

// Load the source table

LOAD * from source...;

// Load the fieldname mapping table

FieldMap:

MAPPING LOAD Field, Label from mapping_source_file...;

// Rename existing fields using the Map

Rename Fields Using FieldMap;

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Thanks for that edit!

-Rob

aruneshgupta
Creator
Creator
Author

Thank you!