<?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: Store Max ID using tJava and use it in tMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461122#M140768</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/264946"&gt;@root&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/282819"&gt;@JR1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/257838"&gt;@Shicong_Hong&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you please help in making it successful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2024 08:53:04 GMT</pubDate>
    <dc:creator>Amit4</dc:creator>
    <dc:date>2024-06-11T08:53:04Z</dc:date>
    <item>
      <title>Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2460708#M140762</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/245666"&gt;@Shong_888&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I am storing max(ID) from query and in tJava.&lt;/P&gt;
&lt;P&gt;Which I am trying to use and max(ID)+1 in&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amit4_0-1718016282551.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167613i24A1E480DDE0C3F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amit4_0-1718016282551.png" alt="Amit4_0-1718016282551.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Inside tjava:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amit4_1-1718017688055.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167615i22D41F06DF1CDA05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amit4_1-1718017688055.png" alt="Amit4_1-1718017688055.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am struggling to use it in tMap. How can I do that?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amit4_3-1718017935812.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167617iA1D6503ABE9F4FC9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amit4_3-1718017935812.png" alt="Amit4_3-1718017935812.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help!&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;Amit&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 11:14:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2460708#M140762</guid>
      <dc:creator>Amit4</dc:creator>
      <dc:date>2024-06-10T11:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2460722#M140763</link>
      <description>&lt;P&gt;If we can do in any other way to store the max id and use it in tMap. Idea is welcomed.&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jun 2024 11:58:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2460722#M140763</guid>
      <dc:creator>Amit4</dc:creator>
      <dc:date>2024-06-10T11:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461122#M140768</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/264946"&gt;@root&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/282819"&gt;@JR1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/257838"&gt;@Shicong_Hong&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you please help in making it successful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2024 08:53:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461122#M140768</guid>
      <dc:creator>Amit4</dc:creator>
      <dc:date>2024-06-11T08:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461433#M140777</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/270072"&gt;@Amit4&lt;/a&gt;&amp;nbsp;use tJavaRow instead of tJava, store the&amp;nbsp;&lt;SPAN&gt;max(ID) to a context variable for used later on other components.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;tJavaRow code:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;context.varName=input_row.MAX_ID;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 Jun 2024 02:08:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461433#M140777</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2024-06-12T02:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461618#M140785</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/257838"&gt;@Shicong_Hong&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I applied the logic in tJavaRow&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amit4_0-1718180712519.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167790iF9F6DA9DDFD174CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amit4_0-1718180712519.png" alt="Amit4_0-1718180712519.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;But How can we use that variable in tMap output. Also I want it to be in the incremental form. If ID comes as 100 then it should pass as 101 in the output table.&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="Amit4_1-1718182771813.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167795iECEA4B5972CB1839/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amit4_1-1718182771813.png" alt="Amit4_1-1718182771813.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 09:01:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461618#M140785</guid>
      <dc:creator>Amit4</dc:creator>
      <dc:date>2024-06-12T09:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461637#M140786</link>
      <description>&lt;P&gt;change the code to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;context.MaxID=input_row.MAX_ID+1;&lt;/P&gt;
&lt;P&gt;and use the context variable directly in the expression field of column.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Shicong_Hong_1-1718184738608.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167798i675C00D6FD952B80/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Shicong_Hong_1-1718184738608.png" alt="Shicong_Hong_1-1718184738608.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 09:34:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461637#M140786</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2024-06-12T09:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461696#M140791</link>
      <description>&lt;P&gt;Thanks but My ID column is of Bigdecimal data type upon adding 1 it is getting failed which is legit.&lt;BR /&gt;How can we deal with this data type issue.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 11:19:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461696#M140791</guid>
      <dc:creator>Amit4</dc:creator>
      <dc:date>2024-06-12T11:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461700#M140792</link>
      <description>&lt;P&gt;Hello Amit,&lt;/P&gt;
&lt;P&gt;I use the tSetGlobalVar component to store a (initial) max id value, and globalMap.get(...) to retrieve it. (I have an Integer data type that is the start value for a Numeric.Sequence(...).)&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Thomas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 11:43:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2461700#M140792</guid>
      <dc:creator>ThWabi</dc:creator>
      <dc:date>2024-06-12T11:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462101#M140802</link>
      <description>&lt;P&gt;If ID column is of Bigdecimal data type in output table , use this code&amp;nbsp;&lt;SPAN&gt;in the expression field of column on tMap.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;new java.math.BigDecimal(context.MaxID)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 09:34:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462101#M140802</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2024-06-13T09:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462144#M140805</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/257838"&gt;@Shicong_Hong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Source &amp;amp; Target both table is same and ID column is of BigDecimal data type.&lt;/P&gt;
&lt;P&gt;If I use&amp;nbsp;&lt;SPAN&gt;context.MaxID=input_row.MAX_ID+1 in tJavarow, it is throwing error because of integer addition to BigDecimal.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;We need handle it before and then use it later in tmap&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 10:58:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462144#M140805</guid>
      <dc:creator>Amit4</dc:creator>
      <dc:date>2024-06-13T10:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462173#M140806</link>
      <description>&lt;P&gt;Define the context variable with Bigdecimal type, try this code on tJavaRow:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;context.MaxID=input_row.MAX_ID.add(new java.math.BigDecimal(1));&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 12:17:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462173#M140806</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2024-06-13T12:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462555#M140818</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/257838"&gt;@Shicong_Hong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks it worked well but there is another problem, The whole case is I have to insert the new record into the map table if it's already not there which is coming from Stage table. If there are multiple new records then it is giving same ID for all records. This we need to handle. Below screenshot you can see.&lt;/P&gt;
&lt;P&gt;Max(ID) in Map table is 248 so it Inserted 249, but 3 new records came all got assigned the same, it should go as 249, 250, 251.&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="Amit4_1-1718358468573.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167961i765BC49EEAD9A400/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Amit4_1-1718358468573.png" alt="Amit4_1-1718358468573.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2024 09:52:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462555#M140818</guid>
      <dc:creator>Amit4</dc:creator>
      <dc:date>2024-06-14T09:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: Store Max ID using tJava and use it in tMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462765#M140820</link>
      <description>&lt;P&gt;I used the Numeric sequence is variable an and used in map.&lt;/P&gt;
&lt;P&gt;Var.varIncrementedID = context.MaxID.add(new BigDecimal(Numeric.sequence("s1", 1, 1)))&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Amit4_0-1718464532910.png" style="width: 482px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/167986i1B5F2EEA20CE95C7/image-dimensions/482x147?v=v2" width="482" height="147" role="button" title="Amit4_0-1718464532910.png" alt="Amit4_0-1718464532910.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Now it's working as expected.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Amit&lt;/P&gt;</description>
      <pubDate>Sat, 15 Jun 2024 15:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Store-Max-ID-using-tJava-and-use-it-in-tMap/m-p/2462765#M140820</guid>
      <dc:creator>Amit4</dc:creator>
      <dc:date>2024-06-15T15:18:29Z</dc:date>
    </item>
  </channel>
</rss>

