<?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 tMongoDBRow component - aggregation in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tMongoDBRow-component-aggregation/m-p/2234175#M23630</link>
    <description>&lt;P&gt;I would like to ask you if you you have found a similar problem than us and what workaround the best possible approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are using MongoDB Atlas version 4.0, and it does not support eval function (not supported for MongoDB ATLAS M10 clusters).&lt;/P&gt;
&lt;P&gt;We need to insert aggregated data from a MongoDB collection called "tableHist" to a collection called "table", in an ELT scenario so MongoDB aggregates and inserts data.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;We are considering the usage of tMongoDBRow component, through "Execute command" option, but we are stucked with the query that Talend expects. Please, see the original MongoDB query below:&lt;BR /&gt;db.tableHist.aggregate([&lt;BR /&gt;{$sort: { "npol": -1, "datostable.fechas.fechaPrimerEfecto": -1}},&lt;BR /&gt;{$group: {&lt;BR /&gt;_id:"$npol",&lt;BR /&gt;"doc":{"$first":"$$ROOT"}&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{"$replaceRoot":{"newRoot":"$doc"}}&lt;BR /&gt;],{allowDiskUse:true})&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have tried:&lt;BR /&gt;"db.table.insert(db.tableHist.aggregate([{$sort: { 'npol': -1, 'datostable.fechas.fechaPrimerEfecto': -1}}, {$group: { _id:'$npol', 'doc':{'$first':'$$ROOT'}}}, {'$replaceRoot':{'newRoot':'$doc'}}],{allowDiskUse:true}));"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advanced.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:42:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T03:42:16Z</dc:date>
    <item>
      <title>tMongoDBRow component - aggregation</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tMongoDBRow-component-aggregation/m-p/2234175#M23630</link>
      <description>&lt;P&gt;I would like to ask you if you you have found a similar problem than us and what workaround the best possible approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are using MongoDB Atlas version 4.0, and it does not support eval function (not supported for MongoDB ATLAS M10 clusters).&lt;/P&gt;
&lt;P&gt;We need to insert aggregated data from a MongoDB collection called "tableHist" to a collection called "table", in an ELT scenario so MongoDB aggregates and inserts data.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;We are considering the usage of tMongoDBRow component, through "Execute command" option, but we are stucked with the query that Talend expects. Please, see the original MongoDB query below:&lt;BR /&gt;db.tableHist.aggregate([&lt;BR /&gt;{$sort: { "npol": -1, "datostable.fechas.fechaPrimerEfecto": -1}},&lt;BR /&gt;{$group: {&lt;BR /&gt;_id:"$npol",&lt;BR /&gt;"doc":{"$first":"$$ROOT"}&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;{"$replaceRoot":{"newRoot":"$doc"}}&lt;BR /&gt;],{allowDiskUse:true})&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have tried:&lt;BR /&gt;"db.table.insert(db.tableHist.aggregate([{$sort: { 'npol': -1, 'datostable.fechas.fechaPrimerEfecto': -1}}, {$group: { _id:'$npol', 'doc':{'$first':'$$ROOT'}}}, {'$replaceRoot':{'newRoot':'$doc'}}],{allowDiskUse:true}));"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advanced.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tMongoDBRow-component-aggregation/m-p/2234175#M23630</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T03:42:16Z</dc:date>
    </item>
  </channel>
</rss>

