Sagitarius
Sagitarius

Reputation: 368

Nifi:scheduling processor one day one flowfile

I have to fetch online service with user Id-s(for example from 1 to 100)

I have put 3 parameters start =1, end=100, parameter= 1, in GenerateFlowFile after that i wrote groovy code in exeucutescript processor in a way that it generates 100 flowfile with certain user id-s i want to schedule my processor in a way that it can process only one flowfile in a day and retrieve only one user id in a day,i have

Workflow look like this:

GenerateFlowFile->ExecuteScript->InvokeHttp->putFile

I tried to change Back Pressure Object Threshold from 10000 to 1 but it doesn't work properly**. What should i change to make this task?

Upvotes: 0

Views: 1217

Answers (2)

daggett
daggett

Reputation: 28589

the following works fine

  • after generate flow file set backpressure 1
  • after generate 100 files set backpressure 1
  • for service call set execution once a day (timer or cron)

enter image description here

Upvotes: 2

Up_One
Up_One

Reputation: 5271

So what you need is a loop that will give you flowfile to drive your app.

enter image description here

Also see Nifi template here: http://www.aodba.com/create-loop-apache-nifi/

Sorry for not going into details here but the template will be self explanatory.

I will also go in more detail in the post.

Upvotes: 1

Related Questions