Database Connection option (Use or REgister a shared DB Connection)

Four Stars

Database Connection option (Use or REgister a shared DB Connection)

Does the option Use or register a shared DB Connection Shared DB Connection Name in Database connection settings be configured to dynamically update the connection reading from a database file using trolwfilterate and tjava_2 and pass it onto child jobs to process data migration for multiple tenents. I apologize if i wasn't able to explain it clearly. I wanted to pass context variable values(database connection settings) to child subjobs without having to create the context variable again in the  child job. Is that possible?

 
Moderator

Re: Database Connection option (Use or REgister a shared DB Connection)

Hi,
Do want to pass value from parent job to child? 
Have you already checked KB article about:TalendHelpCenterSmiley Tongueassing a value from a parent Job to a child Job?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Database Connection option (Use or REgister a shared DB Connection)

You can not pass a Database connection created in parent job back to the child job. You can pass the database credentials and properties to the child job using the link that xdshi mentioned above. 
In case you have created a shared connection in parent job and you want to reuse it in child job then please use joblet in that case. Using joblets will let you share the database connection too. 
Four Stars

Re: Database Connection option (Use or REgister a shared DB Connection)

Thanks Sankalp and Sabrina for the response. Sankalp to you response, i am able to pass database connection to child job using the shared db connection option in the connection setting in the parent job and using the shared DB connection name in the child job, but what it dosnt do is when parent connection is refreshed with a new context values(context variables values changed from say db1 to db2) the db2 values are not passed on to the child job , only db1 values were passed . 
So if the table has 10 db connections then only the first connection values are passed to child job . the Shared DB Name dosn't get refreshed with new context variable values. 
Saying all that. I don't think the shared connection works the way i want it to without having to create context variables and passing parameters as Sabrina has suggested with the link to KB article. 
Thank You all responses and Suggestions.
One Star

Re: Database Connection option (Use or REgister a shared DB Connection)

The db connection that you pass to the child is not the same object as parent. it is copy of the it hence any changes in parent are not reflecting in child.
I will suggest using joblets in your case (in case you are using enterprise edition) else you will need to pass the context every time to the child job.
Four Stars

Re: Database Connection option (Use or REgister a shared DB Connection)

Thanks Sankalp for your response. Will try using Joblet and see how that goes. 
Nawaz.