<?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 Re: Catch statistics from a job and store it in DB (using context parameters) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273575#M50522</link>
    <description>&lt;P&gt;Following image is a visual description of the bug:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8I5.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128712i977DC028A1D86F51/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8I5.png" alt="0683p000009M8I5.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2019 18:29:12 GMT</pubDate>
    <dc:creator>peterko</dc:creator>
    <dc:date>2019-11-27T18:29:12Z</dc:date>
    <item>
      <title>Catch statistics from a job and store it in DB (using context parameters)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273570#M50517</link>
      <description>&lt;P&gt;HI,&lt;/P&gt; 
&lt;P&gt;I would like to use the following design steps:&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;Load context from the XML file and set context values in the job&lt;/LI&gt; 
 &lt;LI&gt;Catch statistics/logs from the job and insert the info into PostgreSQL database. &lt;STRONG&gt;DB connection properties are defined by context values loaded in the previous step.&lt;/STRONG&gt;&lt;/LI&gt; 
 &lt;LI&gt;Start data flow - any data processing&amp;nbsp;&lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;All steps are connected via trigger &lt;STRONG&gt;OnSubjobOk&lt;/STRONG&gt; with the step one as is described on the image.&amp;nbsp;All steps are connected via trigger OnSubjobOk with the step one&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The problem is, tStatCatcher data flow did not respect OnSubjobOk trigger and start the data output before the context is loaded from XML, thus I got an error:&lt;/P&gt; 
&lt;PRE&gt;Nov 25, 2019 2:46:38 PM org.postgresql.Driver parseURL
WARNING: JDBC URL invalid port number: null
Exception in component tDBOutput_2 (TestStatsCatcher)
java.sql.SQLException: No suitable driver found for jdbc:postgresql://null:null/null
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at groupe_renault.teststatscatcher_3_0.TestStatsCatcher.tStatCatcher_1Process(TestStatsCatcher.java:2565)
	at groupe_renault.teststatscatcher_3_0.TestStatsCatcher.runJobInTOS(TestStatsCatcher.java:5120)
	at groupe_renault.teststatscatcher_3_0.TestStatsCatcher.main(TestStatsCatcher.java:4920)
Nov 25, 2019 2:46:38 PM org.postgresql.Driver parseURL
WARNING: JDBC URL invalid port number: null&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Based on the error, the job has FAILURE status and tLogCatcher log the error.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any idea how to fix this?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;FYI: I cannot use project settings to set global DB connection for statistics, also I cannot use hard-coded DB connection values because I need to start job dynamically depending on the running environment&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 15:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273570#M50517</guid>
      <dc:creator>peterko</dc:creator>
      <dc:date>2019-11-26T15:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Catch statistics from a job and store it in DB (using context parameters)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273571#M50518</link>
      <description>&lt;P&gt;I can also show you job if needed&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 15:23:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273571#M50518</guid>
      <dc:creator>peterko</dc:creator>
      <dc:date>2019-11-26T15:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Catch statistics from a job and store it in DB (using context parameters)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273572#M50519</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 837px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Gn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143747i693C5926141E2CBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Gn.png" alt="0683p000009M8Gn.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Nov 2019 17:06:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273572#M50519</guid>
      <dc:creator>peterko</dc:creator>
      <dc:date>2019-11-26T17:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Catch statistics from a job and store it in DB (using context parameters)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273573#M50520</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;You will have to mention the DB connection parameters in the stats and logs area of Talend job. Could you please try the method mentioned in the below link?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://help.talend.com/reader/SY4K8FlNZd1_LG0DB1gAcw/uOutrHx062OrG1LaerZETA" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/SY4K8FlNZd1_LG0DB1gAcw/uOutrHx062OrG1LaerZETA&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 00:39:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273573#M50520</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-27T00:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Catch statistics from a job and store it in DB (using context parameters)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273574#M50521</link>
      <description>&lt;P&gt;Yes,&lt;/P&gt; 
&lt;P&gt;I did mention the context parameters in the DB connection parameters as follows:&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Hv.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156314iB394C7D776A11191/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Hv.png" alt="0683p000009M8Hv.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I also did try the solution you've provided via job general tStatCatcher as follows:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8I0.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143748i248F06920D81C200/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8I0.png" alt="0683p000009M8I0.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;But this solution cannot work, because the context is not stored in the project repository, the context is loaded from the file system, thus project setting does not know anything about&amp;nbsp;the DB connection.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;The problem, in general, is that tStatCatcher starts before the context is loaded from the file. Even if the trigger is onSubjobok, tStatCatcher does not respect this trigger.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 18:24:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273574#M50521</guid>
      <dc:creator>peterko</dc:creator>
      <dc:date>2019-11-27T18:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Catch statistics from a job and store it in DB (using context parameters)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273575#M50522</link>
      <description>&lt;P&gt;Following image is a visual description of the bug:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8I5.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/128712i977DC028A1D86F51/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8I5.png" alt="0683p000009M8I5.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 18:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273575#M50522</guid>
      <dc:creator>peterko</dc:creator>
      <dc:date>2019-11-27T18:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Catch statistics from a job and store it in DB (using context parameters)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273576#M50523</link>
      <description>&lt;A href="https://community.qlik.com/s/profile/0053p000007LM5cAAG"&gt;@peterko&lt;/A&gt;, use a tprejob to link to the subjob that load the context variable. eg: 
&lt;BR /&gt;tPrejob--oncomponentok--&amp;gt;tFileinputXML--main--tContextLoad 
&lt;BR /&gt; 
&lt;BR /&gt;other subjobs. 
&lt;BR /&gt; 
&lt;BR /&gt;tStatCatcher--main--tDBOutput 
&lt;BR /&gt; 
&lt;BR /&gt;It should work now. 
&lt;BR /&gt; 
&lt;BR /&gt;Regard 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 28 Nov 2019 10:35:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273576#M50523</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-28T10:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Catch statistics from a job and store it in DB (using context parameters)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273577#M50524</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This works!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;One more question. If I use a prejob, do I need to connect tContextLoad with the main flow via trigger onSubjobOk to make sure the main job won't start if the context has NOT been loaded? Or this behavior is done automatically?&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="image.png" style="width: 846px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Ij.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133480i148C99FA7D35CA5B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Ij.png" alt="0683p000009M8Ij.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Nov 2019 13:44:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273577#M50524</guid>
      <dc:creator>peterko</dc:creator>
      <dc:date>2019-11-28T13:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: Catch statistics from a job and store it in DB (using context parameters)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273578#M50525</link>
      <description>FYI: This works with tStatCatcher component, but does not work with statistics in the job settings/project settings</description>
      <pubDate>Thu, 28 Nov 2019 13:48:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Catch-statistics-from-a-job-and-store-it-in-DB-using-context/m-p/2273578#M50525</guid>
      <dc:creator>peterko</dc:creator>
      <dc:date>2019-11-28T13:48:41Z</dc:date>
    </item>
  </channel>
</rss>

