nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Percivall <joeperciv...@yahoo.com>
Subject Re: How to use GetMongo Projection
Date Mon, 06 Jun 2016 16:34:40 GMT
Hello Stephane,

Sorry no one has responded to this yet. To get a project you can construct the BSON similar
to how is done on this MongoDB page[1]. For example to retrieve only field_1 and field_2 
you would use this as the value of the "projection" property "{ "field_1" : "1", "field_2"
: "1"}".

As for example values, you can find many different example values in templates that use the
processor you're interested in. You can find them in various places, a couple being:
https://cwiki.apache.org/confluence/display/NIFI/Example+Dataflow+Templates
https://github.com/hortonworks-gallery/nifi-templates

[1] https://docs.mongodb.com/manual/tutorial/project-fields-from-query-results/

 
Hope that helps,Joe
- - - - - - 
Joseph Percivall
linkedin.com/in/Percivall
e: joepercivall@yahoo.com



On Thursday, May 26, 2016 10:58 PM, St├ęphane Maarek <stephane.maarek@gmail.com> wrote:



Hi,

How do I construct a bson from the getMongo processor?
Basically, I want to retrieve field_1, field_2

Side note: I think your overall documentation is great, but it's missing "example values".
This will users figure out much more quickly what values is expected from properties

Cheers
Stephane

Mime
View raw message