- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to get multiple values at once from JSON file.?
- Labels:
-
Apache NiFi
Created on ‎07-02-2018 07:38 PM - edited ‎08-18-2019 03:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi , i have a JSON file like below. currently i am using EvaluateJSONPath to get the filename and unique-id and updateattribute to concatenate those 2 into one filename using ${filename:append('_'):append(${unique-id})}
can i do that in EvaluateJSONPath only.? basically i want to avoid 2nd processor if it can be done.
Regards,
Sai
Created ‎07-02-2018 07:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try the following as your JSONPath expression in EvaluateJSONPath:
concat($.name,"_",$.unique-id)
Expression Language is not supported in the JSONPath expressions, so if you need to use flow file attributes you'll need the additional processor to join the two attributes together as you described.
Created on ‎07-02-2018 08:11 PM - edited ‎08-18-2019 03:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created on ‎07-02-2018 09:59 PM - edited ‎08-18-2019 03:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmm that's weird, this works for me:
Created ‎07-03-2018 09:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hum , why wouldnt it work for me..i am running on windows..but that shouldnt stop it right.??
Regards,
Sai
Created ‎07-03-2018 09:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jeez I would hope not, I'm not aware of any platform differences for Jayway (the underlying library used to do JSONPath stuff in NiFi)
