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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

How to use the same tOracleConnection in the subjobs ?

Hello Admins ,
Any Idea How to use the same Oracle Connection between different Jobs ?
the checkbox in tOracleOutput dosent work in this case,
Example:

tOracleConnection ----onSubJobOk------> tRunJob1 --------> tRunJob2
I want to use the same Oracle connection in jobs (1 and 2) how to manage it ?

Thanks in advance
Joseph
Labels (2)
7 Replies
Anonymous
Not applicable

Hi, Chaficc
We have designed a job for your requirement. Call the 1st job as parent job and the 2nd as child job.
Parent job: see pic1
1. On tMysqlConnection_1: create a Mysql DB connection; select the Use or register a shared DB connection box to register a shared DB connection and type in a connection name in the Shared DB connection Name field, for example "Conn".(pic2)
2. On tFixedFlowInput_1: generate a set of test data.(pic3)
3. On tMysqlOutput_1: insert the data into a table called "person"; select the Use an existing connection box to use an existing connection created on tMysqlConnection_1; select Drop table if exists and create item from the Action on table list, this means the Job will create the table if it doesn't exist, drop the table if it already exists and create it again. (pic4)
4. On tRunJob_1: call the 'ChildJob' Job.(pic5)
5. On tMysqlCommit: commit the changes if the Job works fine and close the DB connection.
6. On tMysqlRollback: Rollback the changes if the Job fails and close the DB connection.
Child job(pic6)
1. On tMysqlConnection_1: select the Use or register a shared DB connection box to use a shared DB connection and type in the connection name "Conn", which is defined in ParentJob Job, in the Shared DB connection Name field. We don't need to set the DB connection parameters like Host on this component, allow them to be empty, as the component will use a shared DB connection.?pic7?
2. On tMysqlInput_1: read data from "person" table.
3. On tLogRow_1: print the data on the console.

Best Regards
Sabrina
Anonymous
Not applicable

I have the same issue with Oracle. Your note says " leave parameters blank". I tried using "" and " ". But, I get message:
Exception in component tOracleConnection_1
java.sql.SQLException: Invalid number format for port number
If I leave box blank, the job won't generate. It says required fields are missing.
Anonymous
Not applicable

Hi,
Did you create a t<DB>connection in Parent job with information? Please paste your job design screenshots into forum so that we can address your issue quickly.
Best regards
Sabrina
Anonymous
Not applicable

I am using Talend for MDM version 5.2.2. MY job calls 9 subjobs. I cut the image from the calling job SC_Data_load_1 and one of the called jobs Stage_R3_KNA1_ALL.
I didn't see the images. I am editing to try again.
G_
Contributor II
Contributor II

Hi Sabrina,

I have a small question on the subjob. So if we call "Use or register a shared DB connection" for multiple subjobs. Will it open a single DB connection for multiple jobs or will it open multiple connections for multiple subjobs in DB
Thanks,
Ganesh
_AnonymousUser
Specialist III
Specialist III
Author

Hi Sabrina,
Can you please send me the pics of the jobs (parent & child) ?
Thank you
Abdellah
Anonymous
Not applicable

Hi Abdellah,
Please take a look at this KB article about: TalendHelpCenter0683p000009M9p6.pngharing database connection between parent job and child job
Let us know if it is Ok with you.
Best regards
Sabrina