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: [email protected]
On Thursday, May 26, 2016 10:58 PM, Stéphane Maarek <[email protected]>
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