Four Stars

Unable to use tPreJob & tPostJob components

I am unable to use tPreJob & tPostJob components in Talend open studio 6.4. When I right-click on these components then I get Trigger->On Component Ok as the only option. Nothing appears in 'Setting's as well. Please let me know how to resolve this issue. 

  • Data Integration
7 REPLIES
Nine Stars TRF
Nine Stars

Re: Unable to use tPreJob & tPostJob components

Hi,

This is normal.

You don't have to configure anything in these components.

They're just here to start autonomous subjob where the corresponding event occurs.

There is not output flow from these components.


TRF
Ten Stars

Re: Unable to use tPreJob & tPostJob components

That is exactly what you would expect. tPreJob and tPostJob components are used to run before your main body of code and after your main body of code. Think of them as StartUp and ShutDown activators. The tPostJob is REALLY useful because it will always run....even if you have Java errors that stop the job.

 

What you need to do is to use the OnComponentOK triggers to connect to another component to "start" your pre or post process.

Rilhia Solutions
Four Stars

Re: Unable to use tPreJob

Hi,


Actually I want to initialize DA connection in tPreJob & close it in tPostJob. Can you plz suggest how can I do it
Four Stars

Re: Unable to use tPreJob

Hi,


Actually I want to initialize database connection in tPreJob & close it in tPostJob. Can you plz suggest how can I do it

Ten Stars

Re: Unable to use tPreJob

As you would if it was in the main body of the code. Treat the OnComponentOK trigger as you would in the main job.

Rilhia Solutions
Four Stars

Re: Unable to use tPreJob

I want to initialize database connection in tPreJob & close it in tPostJob. How can I achieve it?

Ten Stars

Re: Unable to use tPreJob

Connect the DB Connection component to the tPreJob component. 

 

Connect the DB Close component to the tPostJob component. 

 

The rest of the code will be able to use this connection now.

Rilhia Solutions