Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using TOS 7.1.* and wanted to automate the talend jobs using either task scheduler or Crontab .
I have a job which uses oracle tdbconnection ("Use an existing connection" option checked in tdbinput)
When i build the job and schedule it in task scheduler the execution fails, throwing error at the tdbinput (java.lang.NullPointerexception) this is because their is no connection between the tdbconnection and input components.
The above issue is resolved when i create a subjobok link between tdbconnection and tdbinput_1
But what to be done if I have more than one tdbinput components in the job ,as onsubjobok failed to connect to second tdbinput.
Since there is no link between the tdbconnection and tdbinput_2 the job in task scheduler fails complaining on tdbinput_2.
Is there any workaround or alternative to have tdbconnection to all tdbinput's in the JOB.
Hi, This should not be an issue if you are connecting tDbConnection component with tPreJob. The design should be like below-
tPreJob---->tDbConnection
tDbInput_1--->..
|
tDbInput_2 --->
Thanks
Hi, This should not be an issue if you are connecting tDbConnection component with tPreJob. The design should be like below-
tPreJob---->tDbConnection
tDbInput_1--->..
|
tDbInput_2 --->
Thanks
Hi,
@pabburi : your second picture shows an incorrect job. It has 2 components with green background: one being your db connection.
That means that you don't know which component will start first, and if the first to start is the dbinput, it will fail as the connection doesn't exist.
You have to tell Talend to first open the connection, then use it.
You can put your db connection just after a tPreJob component as suggested but I do not recommend that because if your connection fails, the job will still run and might produce unwanted result if you do something else than just reading data.
In my opinion, it's best to open the connection and connect the dbinput to it with an OnSubjobOk or OnComponentOk link :
Still in your second screenshot, simply add a OnSubjobOk from the dbconnection to the dbinput :
tdbconnection ==[OnSubjobOk]==> tdbinput
Regards