Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
RA6
Creator
Creator

Managing multiple external context file within talend job

Hello guys,

i have a single job, but i have 3 different context file with same keys but different values and i have replicated them for different environment.

/Documents/Contexts/Local Machine/

clientContextFile1.ctx

clientContextFile2.ctx

clientContextFile3.ctx

/Contexts/Preproduction/

clientContextFile1.ctx

clientContextFile2.ctx

clientContextFile3.ctx

/Contexts/Production/

clientContextFile1.ctx

clientContextFile2.ctx

clientContextFile3.ctx

Is there a way to tell the job that which context file needs to runs?

Many thanks.

Best regards,

Duke

2 Replies
manodwhb
Champion II
Champion II

@Rohit Aftab​ , You can look at the below url.

 

https://help.talend.com/reader/U5lNkhUnaW6RdpL8qxP61w/84zFys6xMJoFls7IumFFOA

 

Thanks,

Manohar

Anonymous
Not applicable

Hey,

 

The answer depends how do you use those files: implicit context load or tContextLoad?

If you use the component:

I would use the internal variable contextStr which refers to the environment where you run your job. Which means you can write an IF clause in the beginning of your prejob. And when calling your job, you can also overwrite context variables: this is important! You need to know the hierarchy of loading context variables: implicit context load >> context in TAC/BAT file >> context in parent job (depending on development >> context in child job)

 

As you notice, a lot of IFs to answer your question, but I hope it will give you some insights to solve the problem.

 

Kind regards,

JVL