- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Loop and SplitJson iteration
- Labels:
-
Apache NiFi
Created ‎06-14-2023 02:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
hope someone can help me with this point.
I have a json wich has been splitted into 4 fragments.
For every fragment an EvaluateJsonPath is grabbing some attributes from it.
Next, for every fragment, i need to fetch a file from local folder and do an UpdateRecord or QueryRecord(Update Statement) with attribute values contained in every fragment and retrieved by EvaluateJsonPath.
So based on my understanding, and sequentially for every fragment, i should:
1 - fetch the local file
2 - UpdateRecord or QueryRecord by updating fields values with fragment attribue
3 - Save file into disk
and repeat(loop) each step for every fragment.
However i think this is wrong cause the next fragment could fetch the local file before the previous one is finished(saved to disk updated)
How can i achieve this? Which is the best way to sequentially loop over every fragments and do some stuff?
Many thanks for your help.
appreciate
Created ‎06-19-2023 06:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎06-20-2023 12:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes correct....the file is read in the first fragment, updated and then saved into a local folder....and so on for every fragment.
I want to be sure that every updare is saved without loosing data.
