Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 04-12-2022 12:31 AM - edited 04-12-2022 01:51 AM
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.
Created 04-12-2022 07:04 AM
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
Created 04-16-2022 03:17 AM
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:
EvaluateJSONPath:
ExtractText:
Created 04-12-2022 07:06 AM
also, you mentioned "Processor doesn't read saved attribute" Which specific processor you are complaining about ?
Created on 04-18-2022 06:22 AM - edited 04-18-2022 06:23 AM
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.