-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
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" } }
] )
Metadata
Metadata
Assignees
Labels
No labels