GetMongo can also use the body of a flowfile for the query. That is its new
default behavior if you leave the query field blank and have an incoming
connection from another processor. That would be a good way to integrate
the flow with another application. For example, you could add FetchKafka to
the flow and have your applications post messages to Kafka with the queries
they want it to run and FetchKafka would send that JSON to GetMongo as it
comes in. Or you could build a REST service that writes the JSON to disk
and use GetFile to load it. Lots of ways to do this.

On Wed, May 2, 2018 at 6:42 AM Sivaprasanna <sivaprasanna...@gmail.com>
wrote:

> Since I'm not so sure about your exact use case, I have just created a
> rough template based on the simple example flow that I had posted earlier
> which is GenerateFlowfile -> UpdateAttribute -> GetMongo. I have attached
> the template here.
>
> -
> Sivaprasanna
>
> On Wed, May 2, 2018 at 2:55 PM, Brajendra Mishra <
> brajendra_mis...@persistent.com> wrote:
>
>> Hi Sivaprasanna,
>>
>> Could you please provide me the sample template for the same, where I can
>> pass parameters (and get those parameters' value to process further) to
>> GetMongoDB processor?
>> It would be a great help for us.
>>
>> Brajendra Mishra
>> Persistent Systems Ltd.
>>
>> -----Original Message-----
>> From: Sivaprasanna <sivaprasanna...@gmail.com>
>> Sent: Wednesday, May 02, 2018 2:28 PM
>> To: dev@nifi.apache.org
>> Subject: Re: GetMongoDB : How to pass parameters as input to GetMongoDB
>> processor
>>
>> Hi.
>>
>> GetMongo can take input. So technically you can use a processor before
>> and then connect it  to GetMongo.
>>
>> A simple example :
>> GenerateFlowfile -> UpdateAttribute -> GetMongo
>>
>> In the UpdateAttribute, you can add attributes for the database and
>> collection and then use them in GetMong using NiFi Expression Language.
>>
>> Let me know, if that doesn’t help.
>>
>> -
>> Sivaprasanna
>>
>> On Wed, 2 May 2018 at 1:26 PM, Brajendra Mishra <
>> brajendra_mis...@persistent.com> wrote:
>>
>> > Hi Team,
>> > We have found there is only 'GetMongoDB' processor to connect and
>> > query to MongoDB in Apache NiFi.
>> > Hence, we this processor does not take any type or input.
>> >
>> > Do we have another type to Apache NiFi processor which can take
>> > parameters as input (details of MongoDB, query, instance etc.) from
>> other processor?
>> > If not then please suggest when such type of processor can be expected
>> > in upcoming release?
>> >
>> > Brajendra Mishra
>> > Persistent Systems Ltd.
>> >
>> > DISCLAIMER
>> > ==========
>> > This e-mail may contain privileged and confidential information which
>> > is the property of Persistent Systems Ltd. It is intended only for the
>> > use of the individual or entity to which it is addressed. If you are
>> > not the intended recipient, you are not authorized to read, retain,
>> > copy, print, distribute or use this message. If you have received this
>> > communication in error, please notify the sender and delete all copies
>> of this message.
>> > Persistent Systems Ltd. does not accept any liability for virus
>> > infected mails.
>> >
>> DISCLAIMER
>> ==========
>> This e-mail may contain privileged and confidential information which is
>> the property of Persistent Systems Ltd. It is intended only for the use of
>> the individual or entity to which it is addressed. If you are not the
>> intended recipient, you are not authorized to read, retain, copy, print,
>> distribute or use this message. If you have received this communication in
>> error, please notify the sender and delete all copies of this message.
>> Persistent Systems Ltd. does not accept any liability for virus infected
>> mails.
>>
>
>

Reply via email to