PDA

View Full Version : MongoDB-Spoon "Group By" query help



schoudhary
06-28-2012, 06:30 AM
I am using Spoon 4.3.0 and want to create a MongoDB Input. (consequently want to use it in reporting in pentaho server/designer)
Where in I want to run a query expression which has GROUP BY in it.
I tried taking help from query examples both from Pentaho and MongoDB sites.
But I get JSON Parser error. I guess, I don't know even how to construct a query having GROUP BY.

Can someone please help me out in this.

For example something in SQL the query would be

Select sum(quantity),sum(price)
where customer = "xyz"
group by product_name;

Any help would be much appreciated!!

Thanks.

Mark
07-03-2012, 06:20 PM
Group by is a new feature coming out for Mongo 2.2 as part of the aggregation framework:

http://www.mongodb.org/display/DOCS/Aggregation

We would need to add support for this to the MongoDb input step in PDI.

Cheers,
Mark.

schoudhary
07-04-2012, 12:10 AM
Thanks Mark.