<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to Use tPrejob and tPostJob in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329942#M99079</link>
    <description>&lt;P&gt;tPrejob and tPostjob are great when you need execute given tasks, before and after your job. Unlike other components, these components do not process data and cannot be configured. They always execute, even if the main job fails, making them great for tasks that need to be completed even if the job is not successful.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Some scenarios in which you might need to use tPrejob include:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;loading context information&lt;/LI&gt; 
 &lt;LI&gt;logging the start of the job&lt;/LI&gt; 
 &lt;LI&gt;ensuring that a file exists&lt;/LI&gt; 
 &lt;LI&gt;creating a database connection&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;On the other hand, you might use tPostjob to:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;delete any temporary files you created within the job&lt;/LI&gt; 
 &lt;LI&gt;log the end of a job&lt;/LI&gt; 
 &lt;LI&gt;close any connections that you may have created&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;These components are added to jobs the same way any other components are, simply click and drag them from the palette or search for them by clicking on the canvas. All you need to do after that is connect them to your subjob using an “OnComponentOk” connection. Bellow, is an example of tPrejob and tPostjob being utilized.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picc1.png" style="width: 480px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lsn7.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155513i965BEC9396528381/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lsn7.png" alt="0683p000009Lsn7.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jan 2018 20:56:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-01-29T20:56:28Z</dc:date>
    <item>
      <title>How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329942#M99079</link>
      <description>&lt;P&gt;tPrejob and tPostjob are great when you need execute given tasks, before and after your job. Unlike other components, these components do not process data and cannot be configured. They always execute, even if the main job fails, making them great for tasks that need to be completed even if the job is not successful.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Some scenarios in which you might need to use tPrejob include:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;loading context information&lt;/LI&gt; 
 &lt;LI&gt;logging the start of the job&lt;/LI&gt; 
 &lt;LI&gt;ensuring that a file exists&lt;/LI&gt; 
 &lt;LI&gt;creating a database connection&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;On the other hand, you might use tPostjob to:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;delete any temporary files you created within the job&lt;/LI&gt; 
 &lt;LI&gt;log the end of a job&lt;/LI&gt; 
 &lt;LI&gt;close any connections that you may have created&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;These components are added to jobs the same way any other components are, simply click and drag them from the palette or search for them by clicking on the canvas. All you need to do after that is connect them to your subjob using an “OnComponentOk” connection. Bellow, is an example of tPrejob and tPostjob being utilized.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="picc1.png" style="width: 480px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lsn7.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155513i965BEC9396528381/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lsn7.png" alt="0683p000009Lsn7.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 20:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329942#M99079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-29T20:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329943#M99080</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Thanks for sharing it with us.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 06:34:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329943#M99080</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-01-30T06:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329944#M99081</link>
      <description>&lt;P&gt;Thanks for the post/information.&lt;/P&gt;&lt;P&gt;Just to be absolutely clear, the screen shot shown is BEFORE the &lt;EM&gt;OnComponentOk&lt;/EM&gt; connections to the subjob have been added? The subjob being the &lt;EM&gt;employee&lt;/EM&gt; to &lt;EM&gt;tMap&lt;/EM&gt; to &lt;EM&gt;tFileOutputDelimited&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;Or is the screen shot the "final" product?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Aug 2018 21:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329944#M99081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-15T21:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329945#M99082</link>
      <description>&lt;P&gt;Hello CygnusX1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the screenshot shows the final job design. There is no connection from PreJob to the main subjob or from there to PostJob. The "employee" component has a green background, that means it is the start component of the main subjob (executed after PreJob and before PostJob).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 13:14:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329945#M99082</guid>
      <dc:creator>ThWabi</dc:creator>
      <dc:date>2018-09-06T13:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329946#M99083</link>
      <description>&lt;P&gt;&lt;U&gt;A description of the error. This variable is cleared upon entering a step, and is set when an error occurs during step operation. This variable can only be used in the next step condition. The ErrorDescription is also saved in the C.sys.LastErrorDescription and this value is not cleared. For more information about this variable and &lt;FONT color="#000000"&gt;&lt;A href="https://embarkdaily.com/" target="_self" rel="nofollow noopener noreferrer"&gt;embarkdaily&lt;/A&gt;&amp;nbsp;&lt;A href="https://www.embarkup.com/" target="_self" rel="nofollow noopener noreferrer"&gt;embarkup&lt;/A&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 21:34:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329946#M99083</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-28T21:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329947#M99084</link>
      <description>&lt;P&gt;wow! looks great, thank you for sharing!&lt;BR /&gt;I've found just this&amp;nbsp;&lt;A href="http://umashanthan.blogspot.com/2016/01/when-or-how-to-use-tprejob-and-tpostjob.html" target="_self" rel="nofollow noopener noreferrer"&gt;http://umashanthan.blogspot.com/2016/01/when-or-how-to-use-tprejob-and-tpostjob.html&lt;/A&gt;&lt;A href="https://writemyessayonline.com/do-my-homework.html" target="_self" rel="nofollow noopener noreferrer"&gt;link&lt;/A&gt; and it was cool to see one more example&amp;nbsp;of this. for me, as a freelance writer working on different educational projects that's really important&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 16:41:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329947#M99084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-29T16:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329948#M99085</link>
      <description>&lt;P&gt;wow! looks great, thank you for sharing!&lt;BR /&gt;I've found just this&amp;nbsp;&lt;A href="http://umashanthan.blogspot.com/2016/01/when-or-how-to-use-tprejob-and-tpostjob.html" target="_self" rel="nofollow noopener noreferrer"&gt;http://umashanthan.blogspot.com/2016/01/when-or-how-to-use-tprejob-and-tpostjob.html&lt;/A&gt;&lt;A href="https://writemyessayonline.com/do-my-homework.html" target="_self" rel="nofollow noopener noreferrer"&gt;link&lt;/A&gt; and it was cool to see one more example&amp;nbsp;of this. for me, as a freelance writer working on different educational projects that's really important&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 16:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329948#M99085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-29T16:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329949#M99086</link>
      <description>&lt;P&gt;wow! looks great, thank you for sharing!&lt;BR /&gt;I've found just this&amp;nbsp;&lt;A href="http://umashanthan.blogspot.com/2016/01/when-or-how-to-use-tprejob-and-tpostjob.html" target="_self" rel="nofollow noopener noreferrer"&gt;http://umashanthan.blogspot.com/2016/01/when-or-how-to-use-tprejob-and-tpostjob.html&lt;/A&gt; and it was cool to see one more example&amp;nbsp;of this. for me, as a freelance writer working on different educational projects that's really important&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 16:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329949#M99086</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-29T16:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329950#M99087</link>
      <description>&lt;P&gt;If you want to use these components, I think it is necessary to check the state of the prejob before starting main. And this is especially necessary in the case of a base extraction in the middle of a job that lasts one hour. &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The control can be simple, something like this for example:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="prejob_example.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3IE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149549i18FC1246B1002CA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3IE.png" alt="0683p000009M3IE.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 12:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329950#M99087</guid>
      <dc:creator>michad</dc:creator>
      <dc:date>2019-04-08T12:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329951#M99088</link>
      <description>Hi,
&lt;BR /&gt;Great post, however, I'm not a huge fan of using tPreJob for DB connection: if the connection fails, the job will continue unnecessarily (worse, it might even start to do something that will have to be reverted later).
&lt;BR /&gt;tPreJob should really be used with care perfectly knowing that it won't stop the job if it fails!
&lt;BR /&gt;The tPostJob on the other hand is really usefull.
&lt;BR /&gt;Regards.
&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Jun 2019 16:51:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329951#M99088</guid>
      <dc:creator>lennelei</dc:creator>
      <dc:date>2019-06-25T16:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329952#M99089</link>
      <description>&lt;P&gt;And the Advanced settings of tDie : Exit JVM immediately ? tPrejob_1 -&amp;gt; tPostgresqlConnection_1 --[OnSubjobError]--&amp;gt; tDie&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 07:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329952#M99089</guid>
      <dc:creator>martel</dc:creator>
      <dc:date>2019-11-20T07:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329953#M99090</link>
      <description>&lt;P&gt;Hi, i've got a problem with the Postjob execution&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In my simple test case here :&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 367px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M86t.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141878i43FC0F708C619111/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M86t.png" alt="0683p000009M86t.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;What i expect : Tdie Error then Only execute the Postjob part&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Try 1 =&amp;gt; tDie advanced option set with &lt;STRONG&gt;checked&lt;/STRONG&gt; "Exit the JVM immediately"&lt;/P&gt; 
&lt;P&gt;What i got = Tdie Error and no Postjob execution&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Try 2 =&amp;gt; tDie advanced option set with &lt;STRONG&gt;unchecked&lt;/STRONG&gt; "Exit the JVM immediately"&lt;/P&gt; 
&lt;P&gt;What i got = Tdie Error and Main Part execution and Postjob execution&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The only solution i found to have what i expect is using a empty tJava with if link on the tDie CODE:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 580px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8CC.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153766iB1A38DEA2DC1F622/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8CC.png" alt="0683p000009M8CC.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So the tPostjob isnt working in any case ?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 09:57:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329953#M99090</guid>
      <dc:creator>xrocq</dc:creator>
      <dc:date>2019-11-20T09:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329954#M99091</link>
      <description>What i expect : Tdie Error then Only execute the Postjob part
&lt;BR /&gt;??? why you dont add preJobMessagePrint in Prejob and finishing by tDie (and checked stop JVM immediately) ? more simple</description>
      <pubDate>Wed, 20 Nov 2019 10:30:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329954#M99091</guid>
      <dc:creator>martel</dc:creator>
      <dc:date>2019-11-20T10:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use tPrejob and tPostJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329955#M99092</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LOkiAAG"&gt;@martel&lt;/A&gt;&amp;nbsp;This is just a simple test to deal with tDie and PostJob&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In fact what i really need is that tPostjob part (whatever it contains) execute in anycase&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But stopping job execution in case of tDie (DB connection error, missing file...)&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2019 11:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-Use-tPrejob-and-tPostJob/m-p/2329955#M99092</guid>
      <dc:creator>xrocq</dc:creator>
      <dc:date>2019-11-20T11:03:43Z</dc:date>
    </item>
  </channel>
</rss>

