<?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 index rows based on column values in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-index-rows-based-on-column-values/m-p/2375439#M137855</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In the output table of tMap, add a new column and set its expression as:&lt;/P&gt;&lt;P&gt;Numeric.sequence(row1.CityColumnName,1,1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
    <pubDate>Thu, 25 Nov 2021 07:12:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-11-25T07:12:22Z</dc:date>
    <item>
      <title>How to index rows based on column values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-index-rows-based-on-column-values/m-p/2375438#M137854</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm a fairly new user, and still exploring different components and trying to understand how they function. I have ran into a scenario that I know how to solve using SQL, but I was wondering what it would take to implement the logic in a job instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say I have a flow coming from SQL input that looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;City            Item          Quantity&lt;/P&gt;&lt;P&gt;Seattle       House          1&lt;/P&gt;&lt;P&gt;NY             House          3&lt;/P&gt;&lt;P&gt;Seattle      Tower            5&lt;/P&gt;&lt;P&gt;Orlando     House          2&lt;/P&gt;&lt;P&gt;Orlando     Tower           3&lt;/P&gt;&lt;P&gt;Seattle       Pool             4&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to add a column to it, which will show index value based on the values in the City column,  counting unique occurrences. It should look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;City            Item          Quantity    Index&lt;/P&gt;&lt;P&gt;Seattle       House          1               1&lt;/P&gt;&lt;P&gt;NY             House          3                1&lt;/P&gt;&lt;P&gt;Seattle      Tower            5               2&lt;/P&gt;&lt;P&gt;Orlando     House          2                1&lt;/P&gt;&lt;P&gt;Orlando     Tower           3                2&lt;/P&gt;&lt;P&gt;Seattle       Pool             4                3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The simplest way I can think of doing this in a job would be doing it all in Java using tJava or maybe tJavaFlex - creating a map collection, incrementing values based on a key, then converting it back to a flow. Or should I just do it all in SQL in the input block?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:29:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-index-rows-based-on-column-values/m-p/2375438#M137854</guid>
      <dc:creator>VNovitskiy</dc:creator>
      <dc:date>2024-11-15T23:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to index rows based on column values</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-index-rows-based-on-column-values/m-p/2375439#M137855</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;In the output table of tMap, add a new column and set its expression as:&lt;/P&gt;&lt;P&gt;Numeric.sequence(row1.CityColumnName,1,1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 07:12:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-index-rows-based-on-column-values/m-p/2375439#M137855</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-25T07:12:22Z</dc:date>
    </item>
  </channel>
</rss>

