Saturday, January 9, 2016

When or how to use tPrejob and tPostjob in Talend

The tPrejob and tPostjob components are designed to make the execution of tasks before and after a given job easier to manage.

These components differ from other components in that they do not actually process data and they do not have any components properties to be configured. A key feature of these components is that they are always guaranteed to be executed, even if the main data Job fails. Therefore, they are very useful for setup and teardown actions for a given Job.
Tasks that require the use of a tPrejob component include:
  • Loading context information required for the subjob execution.
  • Opening a database connection.
  • Making sure that a file exists.
  • Tasks that require the use of a tPostjob component include:
  • Cleaning up temporary files created during the processing of the main data Job.
  • Closing a database connection or a connection to an external service.
  • Any task required to be executed, even if the preceding Job or subjobs failed.

The following screenshots show few example of usage of tPrejob and tPostjob

https://help.talend.com/images/54/bk-tp-ds-studio-ug-542/PrepostJob1.png
http://www.talendbyexample.com/images/component-reference/talend-tprejob-tpostjob-components-01.png
Cheers!
Uma

No comments:

Post a Comment