Support Questions

Find answers, ask questions, and share your expertise

Processor doesn't read saved attribute

avatar
Explorer

Hi,
I have a flow where I make an HTTP request, and I save as an attribute the last ID value with EvaluateJsonPath and ExtractText processors. However, the InvokeHTTP processor doesn't read the saved attribute. What should I change? 

 

I attach an image of this part of the flow. Thank you very much in advance. I'm stuck at this point and I don't know what else to try.

image.png

4 REPLIES 4

avatar
Master Collaborator

trying to understand your flow pipeline with respect to your use case explanations, You have two upstream queued for InvokeHTTP , in one  using ExtractText you are extracting text , which will be stored in flow file as an attribute then running HTTP Method from InvokeHTTP and configured Attributes to Send for the attributed which is created by ExtractText ? 

What GenreateFlowFile os doing in this flow?  what evaluation is configured with EvaluateJsonPath ?

Please provide more details

 

avatar
Explorer

Thank you very much, ckmar, for your interest in my issue. I will provide you more details.

 

With InvokeHTTP, I make a request, which returns N rows in JSON format. To build this request I want to use the ID obtained in the previous request (separated by an interval of 5 minutes), because I need to get only new rows (with higher ID).  To do this, with EvaluateJsonPath I get the highest ID, which I call last_entry_no, and with ExtractText I try to do the mapping to the attribute.

 

Therefore, what I need is that InvokeHTTP reads the attribute that I tried to assign in ExtractText.

 

Probably none of this is done this way, but I am starting with NiFi and I am trying all the options until I find a solution.

 

I added to the flow the GenerateFlowFile processor because I read somewhere that it was needed to start the flow, but it doesn't do any specific function.

 

I attach screenshots with the configuration of these processors. Thank you very much again.

 

InvokeHTTP:

invoke.PNG

EvaluateJSONPath:

evaluate.PNG

ExtractText:

extract.PNG

avatar
Master Collaborator

also, you mentioned "Processor doesn't read saved attribute" Which specific processor you are complaining about ? 

avatar
Explorer

I would need InvokeHTTP to read the attribute obtained from the previous request, done with the same processor. That was not a complaint, but desperation due to my incompetence. I guess that I am doing something wrong and that there will be a solution. Thank you again.