<?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: Sequence not starting from previous value in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301877#M73919</link>
    <description>&lt;P&gt;Can you please check the attached screenshot and let me know if it is correctly done?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is correctly done, then also i am not able to set up the max value to the variable instead it is coming as 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output: the max value is :0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LtUb"&gt;capture_2.PNG&lt;/A&gt;</description>
    <pubDate>Wed, 12 Sep 2018 11:57:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-09-12T11:57:28Z</dc:date>
    <item>
      <title>Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301868#M73910</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;I'm trying to generate the sequence number for each newly inserted value. But when i'm inserting new records and run the job again, the sequence starts from 1 for the new values but not from the previous (max) value.&lt;/P&gt; 
&lt;P&gt;This is the expression i have used&amp;nbsp; "Numeric.sequence("s2",(row5.id == null?1:row5.id)+1,1)&amp;nbsp; ", where row5.id is the max id from aggregaterow component.&lt;/P&gt; 
&lt;P&gt;Please find the attached screenshot for reference.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 13:10:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301868#M73910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-23T13:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301869#M73911</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you share your tMap?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 13:22:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301869#M73911</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-10-23T13:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301870#M73912</link>
      <description>&lt;P&gt;Hi TRF,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find the attached screenshot of tMap.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LqzB"&gt;Capture.JPG&lt;/A&gt;</description>
      <pubDate>Mon, 23 Oct 2017 13:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301870#M73912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-23T13:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301871#M73913</link>
      <description>&lt;P&gt;Try to get the current max value in a 1st subjob (reuse what you do tFileInputExcel_3 and tAggregateRow_1).&lt;/P&gt;
&lt;P&gt;Push the result into a&amp;nbsp;global variable ("curMax" in the following).&lt;/P&gt;
&lt;P&gt;Connect the new subjob to tFileInputExcel_1 using a "On Subjob Ok" triger.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remove the tMap input associated to row5.&lt;/P&gt;
&lt;P&gt;In tMap_1, set the out1 id with the following&lt;/P&gt;
&lt;PRE&gt;Numeric.sequence("s2", (Integer)globalMap.get("curMax", 1))&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 13:55:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301871#M73913</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-10-23T13:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301872#M73914</link>
      <description>&lt;P&gt;Thanks TRF !&lt;/P&gt; 
&lt;P&gt;It worked like a charm. Attaching the screenshot for others reference.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;And TRF, Can you please explain what is wrong with the first version of the Job. I reckon the value of tAggregate component is not propagated correctly, isn't it ?&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LqzQ"&gt;2.JPG&lt;/A&gt;</description>
      <pubDate>Mon, 23 Oct 2017 14:27:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301872#M73914</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-23T14:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301873#M73915</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Push the result into a&amp;nbsp;global variable ("curMax" in the following).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How do you push the result into a global variable?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;which component and syntax to be used?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 11:19:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301873#M73915</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-12T11:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301874#M73916</link>
      <description>&lt;P&gt;Great!&lt;/P&gt;&lt;P&gt;Need to know what in the component to try to explain why it doesn't work as desired.&lt;/P&gt;&lt;P&gt;Share details if needed.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 11:26:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301874#M73916</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-09-12T11:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301875#M73917</link>
      <description>&lt;P&gt;As per your reply in the one of the post you have metioned this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also trying to understand where do you implement this step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached is the post that i am talking about.&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Ltek"&gt;capture.PNG&lt;/A&gt;</description>
      <pubDate>Wed, 12 Sep 2018 11:29:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301875#M73917</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-12T11:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301876#M73918</link>
      <description>&lt;P&gt;OK.&lt;/P&gt;&lt;P&gt;You need to use globalMap.put method&amp;nbsp;for that.&lt;/P&gt;&lt;P&gt;Based on the previous post, it should look like this (I assume the field containing the value to store into the global variable is called maxValue):&lt;/P&gt;&lt;PRE&gt;globalMap.put("curMax", row5.maxValue);&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Sep 2018 11:41:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301876#M73918</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-09-12T11:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301877#M73919</link>
      <description>&lt;P&gt;Can you please check the attached screenshot and let me know if it is correctly done?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is correctly done, then also i am not able to set up the max value to the variable instead it is coming as 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Output: the max value is :0&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LtUb"&gt;capture_2.PNG&lt;/A&gt;</description>
      <pubDate>Wed, 12 Sep 2018 11:57:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301877#M73919</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-12T11:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence not starting from previous value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301878#M73920</link>
      <description>&lt;P&gt;Sorry,&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I have a global variable set and then I want to use it in tMap component through a sequence:&lt;/P&gt;&lt;P&gt;- Component tSetGlobalVar:&amp;nbsp;&lt;SPAN&gt;globalMap.get("maxNegoId")&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-tMap Expresion for an output column:&amp;nbsp;Numeric.sequence("s1",(Integer)globalMap.get("maxNegoId",1))&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the system gives error: The method get(Object) in the type Map&amp;gt;String.Object&amp;gt; is not applicable for the arguments (String, int)&lt;/P&gt;&lt;P&gt;Can you please help me to resolve it?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2018 16:58:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence-not-starting-from-previous-value/m-p/2301878#M73920</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-03T16:58:01Z</dc:date>
    </item>
  </channel>
</rss>

