Is it possible to count records in a MongoDb collection using the GetMongo processor?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to count records in a MongoDb collection using the GetMongo processor?

Byers, Steven K (Steve) CTR USARMY MEDCOM JMLFDC (US)

Hi everyone,

Is there a way to use the GetMongo processor to count the number of records in
a collection that has a certain value for a field in the collection?

For example, how would I count the number of documents in the Names collection
where firstName = Steve?

Thank you,

Steven K. Byers
Perspecta Inc. Contractor
Software Developer - Joint Medical Logistics Functional Development Center
(JMLFDC)
Defense Health Agency (DHA)/ Health Information Technology (HIT) Directorate/
Solution Delivery Division (SDD)/Clinical Support Branch/JMLFDC
1681 Nelson Street, Fort Detrick, MD  21702
(443) 538-7575 | (410) 872-4923
Email:     [hidden email]


smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to count records in a MongoDb collection using the GetMongo processor?

Mike Thomsen
Right now the only way to do it would be to use RunMongoAggregation to do
the aggregation query that counts.

On Wed, Oct 3, 2018 at 2:56 PM Byers, Steven K (Steve) CTR USARMY MEDCOM
JMLFDC (US) <[hidden email]> wrote:

>
> Hi everyone,
>
> Is there a way to use the GetMongo processor to count the number of
> records in
> a collection that has a certain value for a field in the collection?
>
> For example, how would I count the number of documents in the Names
> collection
> where firstName = Steve?
>
> Thank you,
>
> Steven K. Byers
> Perspecta Inc. Contractor
> Software Developer - Joint Medical Logistics Functional Development Center
> (JMLFDC)
> Defense Health Agency (DHA)/ Health Information Technology (HIT)
> Directorate/
> Solution Delivery Division (SDD)/Clinical Support Branch/JMLFDC
> 1681 Nelson Street, Fort Detrick, MD  21702
> (443) 538-7575 | (410) 872-4923
> Email:     [hidden email]
>
>