<?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 Sequence in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Sequence/m-p/2373666#M136366</link>
    <description>&lt;P&gt;Hi, I have this file which I need to import it along with adding a sequence column, the rule needed for the sequence is as followes:&lt;/P&gt;&lt;P&gt;Columns: ID, ST, PT, BReq, XT&lt;/P&gt;&lt;P&gt;when a new ID the sequence is restarted, but the if the ID is the same as the previous one(s) we compare the 4 columns and see if one of their values is changed, if it does then the sequence will increment by 1, if the 4 columns are the same as the previous one(s) I do not want to insert it in the final file.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;1, j1, o1, p1, q1 - 001&lt;/P&gt;&lt;P&gt;1, j2, o1, p1, q1 - 002&lt;/P&gt;&lt;P&gt;1, j2, o1, p2, q1 - 003&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1, j1, o1, p1, q1 - should be neglected as the four columns are equal to the ones in the first row.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2, j1, o1, p3, q2 - 001&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated, thanks ...&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2018 06:54:18 GMT</pubDate>
    <dc:creator>Moe1</dc:creator>
    <dc:date>2018-02-22T06:54:18Z</dc:date>
    <item>
      <title>Sequence</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence/m-p/2373666#M136366</link>
      <description>&lt;P&gt;Hi, I have this file which I need to import it along with adding a sequence column, the rule needed for the sequence is as followes:&lt;/P&gt;&lt;P&gt;Columns: ID, ST, PT, BReq, XT&lt;/P&gt;&lt;P&gt;when a new ID the sequence is restarted, but the if the ID is the same as the previous one(s) we compare the 4 columns and see if one of their values is changed, if it does then the sequence will increment by 1, if the 4 columns are the same as the previous one(s) I do not want to insert it in the final file.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;1, j1, o1, p1, q1 - 001&lt;/P&gt;&lt;P&gt;1, j2, o1, p1, q1 - 002&lt;/P&gt;&lt;P&gt;1, j2, o1, p2, q1 - 003&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1, j1, o1, p1, q1 - should be neglected as the four columns are equal to the ones in the first row.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2, j1, o1, p3, q2 - 001&lt;/P&gt;&lt;P&gt;etc...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated, thanks ...&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 06:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence/m-p/2373666#M136366</guid>
      <dc:creator>Moe1</dc:creator>
      <dc:date>2018-02-22T06:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence/m-p/2373667#M136367</link>
      <description>&lt;P&gt;OK, this can be done quite easily with a few components. You may need to tweak this if a particular ordering is required, but this certainly meets the rules you have specified. I'll describe this in steps.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) Output your data from your file component to a tAggregateRow component. Set this component up to group by ALL of the fields. This will remove duplicates immediately.&lt;/P&gt;
&lt;P&gt;2) The next component should be a tMap. This is where you sort out your sequence. In your tMap it is a straight pass through. All you columns entering will also exit the other side PLUS a sequence column. Create this output column. Now in a tMap variable (the box in the middle), use the following code....&lt;/P&gt;
&lt;PRE&gt;routines.Numeric.sequence(row1.ID+"", 1, 1) &lt;/PRE&gt;
&lt;P&gt;I've assumed your row will be "row1" and your ID is not a String (hence I added the +""). This is the name of your sequence. So when the same ID passes through it carries on the count for that ID. A new ID creates a new count.&lt;/P&gt;
&lt;P&gt;3) After that, you are done. Do whatever you want with the data and the new sequence.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 09:57:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence/m-p/2373667#M136367</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-22T09:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sequence</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Sequence/m-p/2373668#M136368</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLuBAAW"&gt;@Moe&lt;/A&gt;, did this solution work for you?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 16:31:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Sequence/m-p/2373668#M136368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T16:31:02Z</dc:date>
    </item>
  </channel>
</rss>

