<?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: How to capture # of rows from source,inserted,updated,deleted? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265063#M44721</link>
    <description>&lt;P&gt;When I link from tJava to tMap, I'm not getting any fields.&amp;nbsp; Please advise.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Oct 2018 21:33:03 GMT</pubDate>
    <dc:creator>rp2018</dc:creator>
    <dc:date>2018-10-17T21:33:03Z</dc:date>
    <item>
      <title>How to capture # of rows from source,inserted,updated,deleted?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265057#M44715</link>
      <description>&lt;P&gt;Need to capture following information to a Sql Server table for each of my Talend jobs.&lt;/P&gt;
&lt;P&gt;Have a Talend job&amp;nbsp;whose source is Sql Server db and destination is also a Sql Server db.&amp;nbsp; Using tmap to compare then doing inserts,updates and deletes&amp;nbsp; How can I capture what is my jobname,jobstarttime,jobendtime,source qty,insert qty,update qty and delete qty?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my job design:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tMSSqlInput(Lookup)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/P&gt;
&lt;P&gt;tMSSqlinput--&amp;gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tMap--------------tMSSqlOutput(Insert new rows)&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tMSSqlOutput(Update rows)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tMSSqlOutput(Delete rows)&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:27:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265057#M44715</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2024-11-16T07:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture # of rows from source,inserted,updated,deleted?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265058#M44716</link>
      <description>Start date is not directly available as a variable but you can set a global after the tPreJob with the following TalendDate.getDate("yyyy-MM-dd HH:mm:ss"). 
&lt;BR /&gt;Same for end date after a tPostJob. 
&lt;BR /&gt;For the rest, see global variables created for each component such as NB_LINE_INSERTED, NB_LINE_UPDATED, NB_LINE_DELETED and NB_LINE. 
&lt;BR /&gt;You get the value after the component has finished to process the rows with the following syntax: 
&lt;BR /&gt;((Integer) globalMap.get(" tMSSqlOutput_1_NB_LINE_INSERTED")) 
&lt;BR /&gt;Except for NB_LINE, if the row count exceed 9999, the returned value is 0. In this case you need to store the concerned rows into a tHashOutput and get the number of rows from tHashOutput_1_NB_LINE. 
&lt;BR /&gt;To get the job name, just refer to the standard variable jobname where you want.</description>
      <pubDate>Wed, 17 Oct 2018 03:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265058#M44716</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-10-17T03:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture # of rows from source,inserted,updated,deleted?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265059#M44717</link>
      <description>&lt;P&gt;In all DI jobs, the Start time, End time and duration&amp;nbsp; can also be derived using&amp;nbsp; tChronometerStart and tChronometerStop component.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;For Big data jobs, please follow the&amp;nbsp;suggestions given by TRF.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is the snippet of a DI&amp;nbsp;job for your convenience.&amp;nbsp;&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="Job_TChronometer.png" style="width: 550px;"&gt;&lt;IMG src="https://yutwg22796.i.lithium.com/t5/image/serverpage/image-id/13248i4F0A9ABF88A61047/image-size/large?v=1.0&amp;amp;px=999" title="Job_TChronometer.png" alt="Job_TChronometer.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Content of tJava:&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;long ST = ((Long)globalMap.get("tChronometerStart_1_STARTTIME"));&lt;BR /&gt;long ET = ((Long)globalMap.get("tChronometerStop_1_STOPTIME"));&lt;BR /&gt;&lt;BR /&gt;Date Start_Time_1=new Date(ST);&lt;BR /&gt;Date End_Time_1=new Date(ET);&lt;/P&gt; 
&lt;P&gt;SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");&lt;BR /&gt;String Start_Time = df1.format(Start_Time_1);&lt;BR /&gt;String End_Time = df1.format(End_Time_1);&lt;/P&gt; 
&lt;P&gt;System.out.println("\n ++++++++++++++++++++++++ Job Summary ++++++++++++++++++++++++ \n");&lt;/P&gt; 
&lt;P&gt;System.out.println("\n Job Name : " + jobName);&lt;/P&gt; 
&lt;P&gt;System.out.println("\n Start Time : " + Start_Time);&lt;/P&gt; 
&lt;P&gt;System.out.println("\n End Time : " + End_Time);&lt;/P&gt; 
&lt;P&gt;System.out.println("\n Job Duration : " + ((Long)globalMap.get("tChronometerStop_1_DURATION")) + " milliseconds");&lt;/P&gt; 
&lt;P&gt;System.out.println("\n Input Record Count : " + ((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")));&lt;/P&gt; 
&lt;P&gt;System.out.println("\n ++++++++++++++++++++++++ Job Summary End ++++++++++++++++++++++++ \n");&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="log_screenshot.png" style="width: 665px;"&gt;&lt;IMG src="https://yutwg22796.i.lithium.com/t5/image/serverpage/image-id/13249iCEA961E8EF939A34/image-size/large?v=1.0&amp;amp;px=999" title="log_screenshot.png" alt="log_screenshot.png" /&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;Hope&amp;nbsp;this helps!!!!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Ragu&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 05:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265059#M44717</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-17T05:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture # of rows from source,inserted,updated,deleted?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265060#M44718</link>
      <description>&lt;P&gt;This is exactly what I was looking for.&amp;nbsp; Many Thanks!!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 14:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265060#M44718</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-10-17T14:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture # of rows from source,inserted,updated,deleted?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265061#M44719</link>
      <description>&lt;P&gt;How do you pass the variables information to the next component from tJava?&amp;nbsp; I am able to see all of the results in the run window, but unable to capture it to tMSSqloutput to insert rows to a log table.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 19:41:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265061#M44719</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-10-17T19:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture # of rows from source,inserted,updated,deleted?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265062#M44720</link>
      <description>&lt;P&gt;Start date and end dates are derived along with the formats. so assign&amp;nbsp;it to a context variable with string data type. use those context variables in tMap and&amp;nbsp;&lt;SPAN&gt;connect it to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;tMSSqloutput.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Duration, no of records are from global map, so you can use it directly in tMap.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 20:16:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265062#M44720</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-17T20:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to capture # of rows from source,inserted,updated,deleted?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265063#M44721</link>
      <description>&lt;P&gt;When I link from tJava to tMap, I'm not getting any fields.&amp;nbsp; Please advise.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 21:33:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-capture-of-rows-from-source-inserted-updated-deleted/m-p/2265063#M44721</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-10-17T21:33:03Z</dc:date>
    </item>
  </channel>
</rss>

