Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure: DocumentDB Mongo $group is not supported

After migrating my Mongo app to DocumentDB on Azure the $group queries are no longer working and are throwing the following error:

{ MongoError: '$group' is not supported',
  name: 'MongoError',
  message: '\'$group\' is not supported',
  _t: 'OKMongoResponse',
  ok: 0,
  code: 115,
  errmsg: '\'$group\' is not supported',
  '$err': '\'$group\' is not supported' }

Has anyone else encountered this before and may have any suggestions?

like image 994
Anshul Koka Avatar asked Dec 27 '16 04:12

Anshul Koka


1 Answers

There are two ways you can try

(i) You could try to follow documentdb-lumenize wrote by Larry Maccherone to provide Aggregations (Group-by, Pivot-table, and N-dimensional Cube) and Time Series Transformations as Stored Procedures in DocumentDB

(ii)Recently this feature is supproted by cosmosdb , you can enable this by Preview features pane and turn on MongoDB aggregation pipleline. Follow the following link,

Aggregation in cosmos-db

enter image description here

like image 110
Sajeetharan Avatar answered Nov 10 '22 16:11

Sajeetharan