KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Use of mongodb aggregation pipeline in koolreport #1617

Open akash opened this topic on on Sep 15, 2020 - 3 comments

akash commented on Sep 15, 2020

How can I use mongodb aggregation pipeline in koolreport?

David Winterburn commented on Sep 16, 2020

Hi,

Would you please clarify in more detail how you intend to use MongoDB's aggregate with KoolReport? Thanks!

akash commented on Sep 16, 2020

I know the simple find and projection example of mongoDB which koolreport supports?

'collection' => 'sales',
        'find' => ['age' => ['$gte' => '40']],
        'options' => [
            'skip' => 0,
            'limit' => 5,
            'projection' => [
                '_id' => 0,
                'name' => 1,
                'age' => 1,
            ],    
        ],

But what if I have to $match, $group and $unwind these aggregation operators in query? How should I use this with above query?

David Winterburn commented on Sep 16, 2020

At the moment MongoDataSource hasn't had support for aggregate query yet. We will consider adding it to MongoDataSource in the next release of KoolReport. I will update development progress to you in this topic and send you an early version of the data source if and when it's available. Thanks!

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
help needed

MongoDB