<?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: [resolved] How to compute weighted average in Talend in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221820#M15663</link>
    <description>Thanks a lot!</description>
    <pubDate>Tue, 17 Aug 2010 00:17:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-08-17T00:17:01Z</dc:date>
    <item>
      <title>[resolved] How to compute weighted average in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221815#M15658</link>
      <description>Hello.&lt;BR /&gt;I need to compute weighted average at product leve basedon units and price.&lt;BR /&gt;Here is sample table:&lt;BR /&gt;ProdurctID Units  Price &lt;BR /&gt;222           10     $15 &lt;BR /&gt;333           15     $20 &lt;BR /&gt;444           37     $5 &lt;BR /&gt;&lt;BR /&gt;It is very easy in SQL:&lt;BR /&gt;SELECT ProdurctID, SUM(units * price) / SUM(units) AS wavg FROM table GROUP BY ProdurctID;&lt;BR /&gt;or&lt;BR /&gt;SELECT ProdurctID, SUM(units * price) / SUM(units) over (partition by product) AS wavg FROM table GROUP BY ProdurctID;&lt;BR /&gt;Please explain how to implement it in Talend as I the tool does not let me use SQL functions.&lt;BR /&gt;I use the following components:&lt;BR /&gt;tMysqlInput -&amp;gt; tMap -&amp;gt; tAggregateRow -&amp;gt; tMysqlOutput&lt;BR /&gt;Thank you,&lt;BR /&gt;Pit.</description>
      <pubDate>Sat, 16 Nov 2024 13:18:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221815#M15658</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to compute weighted average in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221816#M15659</link>
      <description>If you are using a DB as your source, you can simply use SQL to calculate these averages in your input components.&lt;BR /&gt;if you have a file, I would use a tAggregateRow to compute all the SUM's for each row, and then a tmap to do the division.</description>
      <pubDate>Sat, 14 Aug 2010 00:23:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221816#M15659</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-14T00:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to compute weighted average in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221817#M15660</link>
      <description>What component should I use to calculate all in SQL? I don't see any references to SQL in tMySQLOutput or Input.</description>
      <pubDate>Sat, 14 Aug 2010 01:15:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221817#M15660</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-14T01:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to compute weighted average in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221818#M15661</link>
      <description>Any ideas, folks?</description>
      <pubDate>Mon, 16 Aug 2010 17:45:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221818#M15661</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-16T17:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to compute weighted average in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221819#M15662</link>
      <description>Peter,
&lt;BR /&gt; You can put custom queries into a tMysqlInput component in the "Query" text box. Just remember that when you write a query manually, you must define the schema manually as well. The schema is positional, so column 1 in the query needs to be schema element 1.</description>
      <pubDate>Mon, 16 Aug 2010 19:55:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221819#M15662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-16T19:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to compute weighted average in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221820#M15663</link>
      <description>Thanks a lot!</description>
      <pubDate>Tue, 17 Aug 2010 00:17:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-compute-weighted-average-in-Talend/m-p/2221820#M15663</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-08-17T00:17:01Z</dc:date>
    </item>
  </channel>
</rss>

