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 03-28-2023 06:57 AM
Hi,
I am receiving and HTTP call in NIFI. Which does the below job:
Now the issue is that if i want to sent the data part by part( Using pagination mode) . For an example:
How can i handle this in NIFI ? Please provide your thoughts on the same. Your help will be much appreciated
Created 03-28-2023 07:52 AM
hi @kumsath,
If you want to split your output from ExecuteSQL, you could try replacing ConvertAvroToJson with a SplitRecord in which you will configure the Record Reader as AVRO and the Record Writer as JSON, whereas the Records per Split can be set by you to any value. In this way, your ExecuteSQL results are always split into smaller chunks, based on your desired output. Of course, you can use the NiFi Expression Language and calculate the Records per Split dynamically and so on.
Created 03-28-2023 10:30 PM
That is fine. But how to send this part by part output in the HTTP response?
Created 03-29-2023 06:07 AM
To be honest I do not really understand your question. If you split your original file into smaller chunks, you will have X flowfiles instead of a single flowfile. Those flowfiles will then go sequentially in your HTTP response Processor, based on your load balance strategy.