<?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 store Variable while running Talend Job in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-store-Variable-while-running-Talend-Job/m-p/2276269#M52409</link>
    <description>Hi 
&lt;BR /&gt;In the beginning of job, read the max ID from a static file and store it to a context variable or global variable for used later. For example: 
&lt;BR /&gt;tFileInputDelimimitecd--main--tJavaRow 
&lt;BR /&gt;on tJavaRow: 
&lt;BR /&gt;context.max_value=input_row.max_value; 
&lt;BR /&gt; 
&lt;BR /&gt;In the main processing of job, 
&lt;BR /&gt;if source data are stored in database, select records only when ids bigger than max value, for example: 
&lt;BR /&gt;"select * from tableName where id&amp;gt;"+context.max_value 
&lt;BR /&gt;if source data are read from file or other data sources, filter the rows on tMap, and then load the result to destination. For example: 
&lt;BR /&gt;tFileInputDelimited--main--tMap--o/p component--main--tSortRow--tMap_2--main--tFleileOutDlimited_2 
&lt;BR /&gt;on tSortRow, sort all the ids with desc model. 
&lt;BR /&gt;on tMap_2: add a sequence number for each row, and filter the rows to get only the first row which is the max ID for this execution. 
&lt;BR /&gt;on&amp;nbsp;tFleileOutDlimited_2: update the max ID to the static file. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
    <pubDate>Fri, 13 Mar 2015 10:55:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-13T10:55:39Z</dc:date>
    <item>
      <title>How to store Variable while running Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-store-Variable-while-running-Talend-Job/m-p/2276268#M52408</link>
      <description>hi,&lt;BR /&gt;Scenario-&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I want to store Some record in File or table with ID column.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Suppose, For first run Storing 10 record&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;then, O/P will be&amp;nbsp;&lt;BR /&gt;ID&lt;BR /&gt;-----&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;10&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Now for Second run it should start from 11. for that we need to store max of last load i.e10&lt;BR /&gt;so it will be&amp;nbsp;&lt;BR /&gt;ID&lt;BR /&gt;---&lt;BR /&gt;1&lt;BR /&gt;2&lt;BR /&gt;3&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;10&lt;BR /&gt;11&lt;BR /&gt;12&lt;BR /&gt;13&lt;BR /&gt;...&lt;BR /&gt;how to do this in Talend.</description>
      <pubDate>Fri, 13 Mar 2015 08:01:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-store-Variable-while-running-Talend-Job/m-p/2276268#M52408</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-03-13T08:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to store Variable while running Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-store-Variable-while-running-Talend-Job/m-p/2276269#M52409</link>
      <description>Hi 
&lt;BR /&gt;In the beginning of job, read the max ID from a static file and store it to a context variable or global variable for used later. For example: 
&lt;BR /&gt;tFileInputDelimimitecd--main--tJavaRow 
&lt;BR /&gt;on tJavaRow: 
&lt;BR /&gt;context.max_value=input_row.max_value; 
&lt;BR /&gt; 
&lt;BR /&gt;In the main processing of job, 
&lt;BR /&gt;if source data are stored in database, select records only when ids bigger than max value, for example: 
&lt;BR /&gt;"select * from tableName where id&amp;gt;"+context.max_value 
&lt;BR /&gt;if source data are read from file or other data sources, filter the rows on tMap, and then load the result to destination. For example: 
&lt;BR /&gt;tFileInputDelimited--main--tMap--o/p component--main--tSortRow--tMap_2--main--tFleileOutDlimited_2 
&lt;BR /&gt;on tSortRow, sort all the ids with desc model. 
&lt;BR /&gt;on tMap_2: add a sequence number for each row, and filter the rows to get only the first row which is the max ID for this execution. 
&lt;BR /&gt;on&amp;nbsp;tFleileOutDlimited_2: update the max ID to the static file. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 13 Mar 2015 10:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-store-Variable-while-running-Talend-Job/m-p/2276269#M52409</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-13T10:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to store Variable while running Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-store-Variable-while-running-Talend-Job/m-p/2276270#M52410</link>
      <description>Hi Shong, 
&lt;BR /&gt;Thanks for reply. I did the same but I am getting same value again not newly max value. 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Kiran B.</description>
      <pubDate>Fri, 13 Mar 2015 14:27:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-store-Variable-while-running-Talend-Job/m-p/2276270#M52410</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-03-13T14:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to store Variable while running Talend Job</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-store-Variable-while-running-Talend-Job/m-p/2276271#M52411</link>
      <description>Hi&amp;nbsp;
&lt;BR /&gt;I don't know which step your are doing some things wrong, can you please export your job and send it to me?
&lt;BR /&gt;BR
&lt;BR /&gt;Shong</description>
      <pubDate>Sun, 15 Mar 2015 04:35:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-store-Variable-while-running-Talend-Job/m-p/2276271#M52411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-15T04:35:17Z</dc:date>
    </item>
  </channel>
</rss>

