<?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: aggregation query in tmongoDBInput in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/aggregation-query-in-tmongoDBInput/m-p/2333028#M101852</link>
    <description>&lt;P&gt;I found the solution after many trials.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just used 2 stages by specifically adding 2 stages in tmongoInput aggregation pipeline mode.&lt;/P&gt;
&lt;P&gt;stage 1 :&amp;nbsp;"{$unwind : {path : '$grid'}}"&lt;/P&gt;
&lt;P&gt;stage 2 :&amp;nbsp;&amp;nbsp;"{$group : {_id : '$grid.product.name','total': {$max : '$dealCreatedAt'}}}"&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>Mon, 26 Mar 2018 16:04:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-03-26T16:04:40Z</dc:date>
    <item>
      <title>aggregation query in tmongoDBInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/aggregation-query-in-tmongoDBInput/m-p/2333027#M101851</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I used below query in tmongodbinnput and it worked fine.&lt;/P&gt; 
&lt;P&gt;"{'$group':{'_id' : {'name':'$product.name','id':'$product.onairId'}, 'total' : {'$max' : '$prgDate'}}}"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But now I am using&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"{'$unwind': {'path' : '$grid'}},{'$group' :{'_id':'$grid.product.name','total':{'$max':'$dealCreatedAt'}}"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;and it is not throwing any error, but it is just unwinding and returning all documents instead of grouping them.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Can anyone please tell how to unwind an array of objects and then do a group and find max of something?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Ravinder&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:30:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/aggregation-query-in-tmongoDBInput/m-p/2333027#M101851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: aggregation query in tmongoDBInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/aggregation-query-in-tmongoDBInput/m-p/2333028#M101852</link>
      <description>&lt;P&gt;I found the solution after many trials.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just used 2 stages by specifically adding 2 stages in tmongoInput aggregation pipeline mode.&lt;/P&gt;
&lt;P&gt;stage 1 :&amp;nbsp;"{$unwind : {path : '$grid'}}"&lt;/P&gt;
&lt;P&gt;stage 2 :&amp;nbsp;&amp;nbsp;"{$group : {_id : '$grid.product.name','total': {$max : '$dealCreatedAt'}}}"&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>Mon, 26 Mar 2018 16:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/aggregation-query-in-tmongoDBInput/m-p/2333028#M101852</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-26T16:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: aggregation query in tmongoDBInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/aggregation-query-in-tmongoDBInput/m-p/2333029#M101853</link>
      <description>&lt;P&gt;Hi when i try to run query:-&lt;/P&gt;
&lt;P&gt;"{'$group':{'_id' : {'_wellname':'$_wellname','_datasetname':'$_datsetname','_variablename':'$_variablename'}, 'total' : {'$sum' : 1}}}"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i get only count ,all columns are blank in output file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want count by column name passed in my query&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 06:30:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/aggregation-query-in-tmongoDBInput/m-p/2333029#M101853</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-06-11T06:30:38Z</dc:date>
    </item>
  </channel>
</rss>

