Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
NiFi processor to search and replace multiple words in a txt file
Labels:
- Labels:
-
Apache NiFi
New Contributor
Created 11-17-2021 07:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have txt file which I am reading using FetchSFTP in NiFi. Also, I have key and values in json format, as shown below received after REST call and JoltTransformJSON:
[{ "Key": "k2s2e2", "Value": "Ottawa" }, { "Key": "60601", "Value": "Chicago" }, { "Key": "", "Value": "London" }]
How can I replace all the occurrences of matching key from above to its value in txt file.
Example: abc.txt
000 apple stocks at k2s2e2 888 9000 samsung stocks at 60601 9990377 88 nokia devivces at 78889 790888071 hgj 7
Output:
000 apple stocks at Ottawa 888 9000 samsung stocks at Chicago 9990377 88 nokia devivces at 78889 790888071 hgj 7
0 REPLIES 0
