Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Hope everyone would be doing good.
Our Team has its own custom connection pool mechanism. Due to security concerns we cant use hardcoded connection information values in context variable files for a talend job.
Instead of using context files to pass hardcoded connection information to talend job, Is there any way to pass custom connection object to talend job ?
I came across this link where we can call talend job from an external java application and pass context information using following code.
Calling a Talend Job from an external Java application
String [] context=new String[] {"--context_param nb_line="+nb_line,"--context_param name="+name};
talendJob.runJob(context);
But this does not serve our purpose. We need to pass our own custom connection object instead of passing just values
Is there any other way to pass custom connection object to talend job?
What if we modify java generated code of talend designer and import our connection pool jar and pass its connection to talend job ? is it possible ? Or if we somehow manage to generate parameterized talend jar file and pass our connection object as parameter.
Kindly share possible solution if any Any body who has same requirement and managed to acheive it.. Any helpful insight would be appreciated
Best Regards,
Hello,
Could you please elaborate your case with an example with input? Passing Custom Connection Object to talend job via global variable?
Here is TalendHelpCenter: tcontextload component which is modifies dynamically the values of the active context. Let us know if it is what you are looking for.
Best regards
Sabrina
Hi Sabrina,
Thanks for your reply. We use a separate jar file to get required connection object . We need to find a way to get connection object from that custom jar file and pass it to Talend job instead of getting it from context or 'tcontextload' suggested by you.
Regards,
Hello,
Could you please elaborate your case with an example with input?
Screenshots will be preferred.
Best regards
Sabrina
Lets take a very basic example of a job reading a table from Database and writing its data in an output File.The connection information of this rDBInput_1 is set through context variables
We cant give connection information like this. Through context variables as a string.
We have a separate java utitlity custom jar which gives us required db connection.
And we want to find a way to get custom connection object from that jar and pass that connection object to Talend Job so that job uses our passed connection
Hey there! We are facing the same problem. Did you find any solution to this, did you manage to pass a custom connection object?