[COMPASS-3183] Aggregation Builder does not support 'new Date()' in $project stage Created: 09/Oct/18 Updated: 11/Mar/19 Resolved: 11/Mar/19 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Aggregation pipeline |
| Affects Version/s: | 1.15.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Scott Stokes (Inactive) | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Description |
|
This pipeline works in the shell, but not in the aggregation builder in Compass (see screenshot) MongoDB Enterprise > db.deleteme.aggregate([ ... { ... $project: { ... description:1, ... CLIENTE_ID: 1, ... SYSDATE: new Date() {{... }}} {{... }}} ... ]) {{ { "_id" : ObjectId("5bb7b050a41eb377486854b2"), "SYSDATE" : ISODate("2018-10-09T19:33:29.364Z") }}} {{ { "_id" : ObjectId("5bb7b066a41eb377486854b3"), "SYSDATE" : ISODate("2018-10-09T19:33:29.364Z") }}} MongoDB Enterprise >
|
| Comments |
| Comment by Asya Kamsky [ 11/Mar/19 ] |
|
massimiliano.marcon if it works in agg builder as shell syntax then it’ll need to be converted to equivalent “get current time” functionality in any language pipeline is being exported to. That’s possible so I agree it makes sense but I think that makes it “not cheap” to implement... |
| Comment by Massimiliano Marcon [ 11/Mar/19 ] |
|
Tracking it in |