Currently we don't have an option to duplicate mappings in Compose. There is a workaround to duplicate the existing mappings which I have tried and works. The steps involve making changes to json file and it's only recommended if you are comfortable doing it.
Environment
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.
Here are the steps:
- Create a deployment package for the project which will create a zip file with project json.
- Unzip the package and open the json file using any test editor (notepad++, textpad etc.)
- Search for the mapping that we want to duplicate and copy the entire tag (starting from { and find the correct })
- Append "id" value to some random number. For eg if Its 172 then make it 17211 (this will ensure we are not breaking the internal ID sequence). This is in the beginning and towards end, 2 entries have to be modified with the same number.
- Retain "entity_id" as is if you want the mapping to be part of same Logical Entity or can update with other entity id value if we want it to be part of other one. We can find the entity ID value searching the name of Logical Entity in the json file.
- Inside the mapping_fields tag, append values for staging_col_name_int tag. For example if its COLID_73_7 then make it COLID_73_711. Do the same steps for all "staging_col_name_int" values.
- Save the json, put it back on the zip and deploy the project. We should see the new mapping.