<?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: Numeric.sequence with Long in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325274#M94890</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LM4wAAG"&gt;@Jacky_Siveton&lt;/A&gt;&amp;nbsp;you have left a couple of method out that you *might* need....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;    /**
     * create a sequence if not exists and put a new startValue
     *
     * {Category} Numeric
     *
     * {param} string("s1") sequence identifier
     *
     * {param} long(1) start value
     *
     * {example} sequence("s1", 1)
     *
     */

    public static void resetSequence(String seqName, long startValue) {
        seq_Hash.put(seqName, startValue);
    }

    /**
     * remove a sequence
     *
     * {Category} Numeric
     *
     * {param} string("s1") sequence identifier
     *
     * {example} sequence("s1")
     *
     */

    public static void removeSequence(String seqName) {
        if (seq_Hash.containsKey(seqName)) {
            seq_Hash.remove(seqName);
        }
    }&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Jul 2017 14:48:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-07-12T14:48:22Z</dc:date>
    <item>
      <title>Numeric.sequence with Long</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325269#M94885</link>
      <description>&lt;P&gt;Good Morning,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to create a sequence which can go until 9999999999 which is actually over the int limit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to pass a Long value to this dedicated Talend function "Numeric.sequence()", but it appears to be not implemented.&lt;/P&gt;
&lt;P&gt;It needs an int and it works if I submit my variable applying intValue(), but it has side effects : it doesn't increment&amp;nbsp;properly at a certain point.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I go until this top value of "&lt;SPAN&gt;9 999 999 999"&amp;nbsp;?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank You.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;note : I'm using Talend Real-Time Big Data &amp;nbsp;Platform 6.2.1 with a Talend Administration Console to launch the jobs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325269#M94885</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric.sequence with Long</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325270#M94886</link>
      <description>&lt;P&gt;You can easily implement this yourself. Go to Code--&amp;gt; Routines--&amp;gt;system in your project tree and find the Numeric routine. Take a look in there for the sequence method. Simply copy this and convert it to use Long in your own routine.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 13:06:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325270#M94886</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-12T13:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric.sequence with Long</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325271#M94887</link>
      <description>&lt;P&gt;Thank You.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'll do that as it seems to be the best way to achieve this until Talend implement it &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 13:11:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325271#M94887</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-12T13:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric.sequence with Long</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325272#M94888</link>
      <description>&lt;P&gt;To be honest, I think the routines that Talend supply are more a useful example of what you can do. I wouldn't expect them to update these too often. It is very useful to build up your own routines (classes) of useful functionality.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 13:55:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325272#M94888</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-12T13:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric.sequence with Long</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325273#M94889</link>
      <description>&lt;P&gt;I think You're right, but we tend to use Talend bundled components and routines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then there is&amp;nbsp;less specific developments to maintain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, there is the code I've adapted in case it could be useful to anyone :&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;private static final java.util.Map&amp;lt;String, Long&amp;gt; seq_Hash = new java.util.HashMap&amp;lt;String, Long&amp;gt;();
      public static Long LongSequence(String seqName, Long startValue, int step) {
        if (seq_Hash.containsKey(seqName)) {
            seq_Hash.put(seqName, seq_Hash.get(seqName) + step);
                  if(seq_Hash.get(seqName)&amp;gt;9999999999L){
                        seq_Hash.put(seqName, 0L);
                  }
            return seq_Hash.get(seqName);
        } else {
            seq_Hash.put(seqName, startValue);
            return startValue;
        }
    }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 14:02:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325273#M94889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-12T14:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric.sequence with Long</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325274#M94890</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LM4wAAG"&gt;@Jacky_Siveton&lt;/A&gt;&amp;nbsp;you have left a couple of method out that you *might* need....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;    /**
     * create a sequence if not exists and put a new startValue
     *
     * {Category} Numeric
     *
     * {param} string("s1") sequence identifier
     *
     * {param} long(1) start value
     *
     * {example} sequence("s1", 1)
     *
     */

    public static void resetSequence(String seqName, long startValue) {
        seq_Hash.put(seqName, startValue);
    }

    /**
     * remove a sequence
     *
     * {Category} Numeric
     *
     * {param} string("s1") sequence identifier
     *
     * {example} sequence("s1")
     *
     */

    public static void removeSequence(String seqName) {
        if (seq_Hash.containsKey(seqName)) {
            seq_Hash.remove(seqName);
        }
    }&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Jul 2017 14:48:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Numeric-sequence-with-Long/m-p/2325274#M94890</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-12T14:48:22Z</dc:date>
    </item>
  </channel>
</rss>

