Created 06-19-2022 02:19 PM
The following flowfile is the response of an "InvokeHttp":
[
{"data1":"[{....},{...},{....}]","info":"data-from_site"},
{"data2":"[{....},{...},{....}]","info":"data-from_site"},
{"data3":"[{....},{...},{....}]","info":"data-from_site"}
]
I did a "SplitJson", i got each json record as a single flowfile
flowfile 1:
{"data1":"[{....},{...},{....}]","info":"data-from_site"}
flowfile 2:
{"data2":"[{....},{...},{....}]","info":"data-from_site"}
flowfile 3:
{"data3":"[{....},{...},{....}]","info":"data-from_site"}
I want to store each json record in each flowfile in a variable like that:
variable1 = "{"data1":"[{....},{...},{....}]","info":"data-from_site"}"
variable2 = "{"data2":"[{....},{...},{....}]","info":"data-from_site"}"
variable3 = "{"data3":"[{....},{...},{....}]","info":"data-from_site"}"
can someone show me how to store the json record in a variable !
Created 06-20-2022 06:11 AM
This is not efficient and will use a lot of heap depending on how big the list and the json array. Can you explain more what are you trying to do and why you want to create different variable for each json flowfile? Maybe there is a better way.
Created 06-20-2022 06:15 AM
To store each json flowfile as a single row in Postgres.
Created 06-20-2022 06:25 AM
I thought we discussed this here:
Created 06-20-2022 06:28 AM
The solution you suggested there wasn't helpful.
Created 06-20-2022 06:40 AM
I apologize for that, I hope someone else step in and help you with better solution. May I just know why it did not help?