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: 
tnewbie
Creator II
Creator II

Best practice for configuring DB connections in TOS

Hello All,

Posting again...Can you please help me with this simple scenario....

I have a simple job that reads table DEV_DB.src_T1 and loads DEV_DB.Tgt_T1. I have developed and tested this on my Dev DB and it works well.

Now I want to do the following, where i need your help:

1) Assuming QA is nothing but a different folder on a different machine (weird but looks like that's what it is in Talend) how do i move the code to QA, is it just a export and import? When i import, how do i ensure that the code in QA folder points to QA DB and not point to DEV DB

Meaning, this  job now reads table QA_DB.src_T1 and loads QA_DB.Tgt_T1

 

This is a very very basic need of any project and i don't find a direct answer to this simple problem from the documentation. I have read through most of the related threads on similar topics where people are talking about context variables and all those threads are left half way through...and some are pointing to Repository manager, don't know where that Repository Manager is.

 

Can you share some thoughts on this please.

Labels (2)
2 Replies
lennelei
Creator III
Creator III

Hi,

 

When you create your database connection, you have an "Export as context" button.

 

Click on it and all the variables will be exported in a context group.

 

In your job, it will now be the context variables which will be used in the database connection component for example instead of fixed Strings.

 

Now, all you have to do is load the correct values in the context variables depending on your environment (DEV, QA, PROD).

 

The easiest way to achieve this is by creating a context for your different environments.

However, it's not the easiest to maintain nor the safest.

 

You also have more complex options, such as implicit or explicit dynamic load of context.

 

Regards

tnewbie
Creator II
Creator II
Author

Greatly appreciate the response and a big "Thank You" Lennelei...will try and let you know