Following code runs fine with nodejs and aggregated results will be inserted into zz collection, but the same code running via trigger (atlas + stitch) always failed to insert results into zz, wondering is this expected or a bug?
db.getCollection('bakesales')
.aggregate( [
{ $match: { date: { $gte: new Date('1970-01-01') } } },
{ $group: { _id: { $dateToString: { format: "%Y-%m", date: "$date" } }, sales_quantity: { $sum: "$quantity"}, sales_amount: { $sum: "$amount" } } },
{ $merge: { into: {db: 'test', coll:"zz"}, whenMatched: "replace" } }
] )
Following code runs fine with nodejs and aggregated results will be inserted into
zzcollection, but the same code running viatrigger(atlas + stitch) always failed to insert results intozz, wondering is this expected or a bug?