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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamic Field assignment through context variabla

Hi!

 

I am looking for a solution for below scenario : 

 

file as below : 

 

field1,field2,field3

1,2,3

4,5,6

7,8,9

 

i want an output file like below : 

 

field4,field5,field6 -- these are column headers and in tmap i want to write something like 

 

row1.context.variable ---context variable is given while manually running the job.

 

Basically i want to give mapping dynamically .

 

field1 is mapped to field4 sometimes , field 1 is mapped to field 5 sometimes ,  mapping information is given in another file .

 

mapping file will have source and target values like below 

 

source,target

filed1,field4

field2,field5

field3,field6 

 

mapping file values are stored in context variables.

 

Mapping file values change each time and in tmap i should be able to map based on context variables.

 

i am able to assign context variable values from the file but the part where mapping is done dynamically i am struggling.

 

Please help .

 

Thanks in Advance,

Alekya

 

Labels (1)
1 Reply
Anonymous
Not applicable
Author

Hi Alekya,

 

    Please do not open multiple posts for same queries as it will waste the efforts of Talend community members. Already members are responding to your other post 

 

https://community.talend.com/t5/Design-and-Development/Dynamic-context-variable-value-based-on-input...

 

So could you please close this post and continue the discussion in already active post?

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂