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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
gimgi69
Contributor
Contributor

Help - Connecting to a JDBC DB with context variables

Hello,

I'm working on TOS 8.0.

Right now, I connect my database with a JDBC connection to a Progress Database.

The general form is like that : jdbc:datadirect:openedge://[serverName[\instanceName]:[portNumber]][;property=value[;property=value]]

The connection is ok.

But I need to automatize this connection because it will change quite often.

I would like to import different JDBC connections from flat file in order to input them in different contexts.

For example, when I will be connected on my server A, I will load the Connection_settings_A.txt with my database connections parameters.

Then, I will be connected on my server B with the same project, I will load the Connection_settings_B.txt with my other JDBC database connections parameters.

The aim is to have a simple job which integrate my flat file with "Connection_settings.txt" then a tContextLoad then my database is connecting on these parameters.

What I did is quite simple :

I started by exporting my current JDBC connection into a context in order to check the architecture.0695b00000fHxUdAAK.pngI add Context.Name in my component and it's working fine, I have access to my DB :

0695b00000fHxXlAAK.png 

Then, I made a flat file with 2 fields key & value and I just copy what I had in my context.

I erase the values in the context field and

I load my file with a tContextLoad.

But it's not working anymore, Talend can't find the jdbc driver but I copy exactly the same as before ! So I don't understand ...

0695b00000fHxb4AAC.png 

I didn't find any documentation concerning the possibility of importing some external contexts for the specific JDBC connection.

if you could help me, I'm stuck on this topic !

Thank you by advance for your help,

Labels (2)
2 Replies
Anonymous
Not applicable

Hi

You miss a 'r' in the end of driver class string.

 

Regards

Shong​

gimgi69
Contributor
Contributor
Author

Thankss!