Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
rahma123
Contributor
Contributor

Use more than one context on a job

Hello,

I have 2 components TOracleInput and TOracleOutput from 2 different databases. So, i create a context group with 2 contexts one for the source and the second for the destination. 

Here, when i execute the job, it takes always the default context 

I create an other group of context which contain the destination but i can't use 2 groups of context on the same job 

How can i resolve this problem ?

Your help please

0683p000009M034.png

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

You've created two Contexts, not two Context Groups. This is not how Contexts work. For the moment, forget Context Groups (they are just methods for grouping Context Variables), you need to create Context Variables for both connections.

 

I'll give you a scenario why this works. Your environment has a source and target database, correct? Is that your only environment or your development environment? Is it replicated in a Test environment and also in a Production environment? If so, you would need 3 Contexts (Dev, Test, Prod). Then you can set values for your Source and Target databases for each of those environments.

View solution in original post

4 Replies
Anonymous
Not applicable

Contexts are environment specific (Prod, DEV, TEST, etc). As such a context is set for the whole job. You have Contexts, Context Groups and Context Variables. You want to set up a Context Group for your source and target, and add Context Variables to these. Then use your Source Context Variables for your source and your Target Context Variables for your target.

rahma123
Contributor
Contributor
Author

Yes. I wil give you more details. 

I created a context group: GRH_CONTEXT which contains 2 contexts whith same variables and different values 0683p000009M0OH.png

After i create two connections:

* SERVER_CNX : source connection

* ODS_CNX: target connection 

Here it takes always the default context 

 

 

 

 

Anonymous
Not applicable

You've created two Contexts, not two Context Groups. This is not how Contexts work. For the moment, forget Context Groups (they are just methods for grouping Context Variables), you need to create Context Variables for both connections.

 

I'll give you a scenario why this works. Your environment has a source and target database, correct? Is that your only environment or your development environment? Is it replicated in a Test environment and also in a Production environment? If so, you would need 3 Contexts (Dev, Test, Prod). Then you can set values for your Source and Target databases for each of those environments.

rahma123
Contributor
Contributor
Author

 

Okay

Thank you very much 

It works now 0683p000009MACJ.png 0683p000009MACJ.png