Sharing an Oracle DB database connection between a parent Job and a child Job

Four Stars

Sharing an Oracle DB database connection between a parent Job and a child Job

Hi Team,

I am using Talend 6.4 and have a master job which has child jobs.

I am trying to utilize the shared Oracle DB connection between the jobs using tOracleConnection.

tOracleInput and tOracleOutput is used to transfer data from source table to destination table.

Mapping has been established with tOracleConnection and tOracleIntput with option "Use an existing connection" onSubJob OK.

I am not able to  establish mapping between tOracleConnection and tOracleOutput

 

Eight Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

Hi Priyag,

 

As per screen shot you cannot give directly from tOracleConnection_2 to tOracleOutput_1 because you have already given on subjob ok from tOracleConnection_1 to tOracleInput_1. To resolve your issue connect like below

tOracleConnection_1

|sunbjob ok

|

tOracleConnection_2

|subjob ok

|

tOracleInput_1 ---> tOracleOutput_1.

 

 

Regards,

Bharath.

 

Don't forget to give kudos If a reply is helpful and click Accept the solution when you think you're good with it.

Four Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

Thanks Bharath for the quick response.I have changed the order of invocations as suggested, but getting a null pointer exception as below. The revised job order as attached

+++++++++++++++++++++++++++++++++++++++

Exception in component tOracleConnection_1 (testjob)
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at testmig.testjob_0_1.testjob.tOracleConnection_1Process(testjob.java:568)
at testmig.testjob_0_1.testjob.runJobInTOS(testjob.java:6275)
at testmig.testjob_0_1.testjob.main(testjob.java:6022)

Four Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

tOracleConnection_1 & tOracleConnection_2 are mapped to Repository which is mapped to Source and Destination schemas
Eight Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

Hi,

 

please see the attachment once for order..

Eight Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

Hi,

 

Have you created context variable when you mapped connection components from Repository?

Four Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

Thanks Bharath this worked.Appreciate your response.

Hope this is the right option to include another jobs after succesful execution of this job?

Four Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

Yes context variable is created
Eight Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

No problem if you think if this gave you the solution please accept this as solution and close this topic.

 

Regards,

Bharath.

 

Kudos are accepted.

Four Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

Hi Bharath,

Thanks. I was trying to establish the mapping between jobs using shared connection.Though I am getting job sucess via tool no data is inserted to the database. 

Four Stars

Re: Sharing an Oracle DB database connection between a parent Job and a child Job

Please refer to the attachment

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog