Passing a session to a child job
Following on from the previous task, this recipe shows how a common connection can be passed from a parent job to a child job.
Getting ready
Open the job jo_cook_ch07_0070_databaseSessionParent
, which is the same as the completed version from the previous recipe, but with the main process replaced with a child job. On inspection you should see that the child job has a connection set up and it is the same connection as the parent job.
How to do it…
The steps to be performed are as follows:
- Run the job. If you inspect the database table
testSessionChild
, you will see that no records have been added to the database. - Open
tMysqlConnection
in the parent job. - Tick the box Use or register a shared DB Connection, and set the ...
Get Talend Open Studio Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.