Created on 11-17-2021 07:23 AM - edited 11-17-2021 08:06 AM
Hello all
I have a NiFi data flow that has flowfiles containing multiple json records (with exactly the same received time) and I'm trying to extract the timestamp as a flowfile attribute as follows:
All the received times match as I'm using a PartitionRecord processor prior to EvaluateJsonPath, I have confirmed they are identical.
I am aware that I can split > extract > merge but I am trying to avoid that due to the high volume of data passing through this flow, is there any way to just extract the first timestamp for all the records in a single flowfile using EvaluateJsonPath? or another record processor?
I am also trying to avoid having to use ExtractText and regex to pull the timestamp, again due to the volume of data in the flow.
There is an existing flow working in our production environment using plain/text and regex etc. I am trying to re-design using record processing to improve efficiency.
any assistance welcome.
🙂
Created 11-22-2021 01:46 AM
Hi ,
Since there is no json structure mentioned in the question , Could you please check the JOLT nifi processor . Refer the jolt specification .
https://stackoverflow.com/questions/61697356/extract-first-element-array-with-jolt
Using Jolt nifi processor , we can perform many transformations from json file.
Thanks
Created 11-25-2021 03:18 AM
Thanks for the reply, is there a way to use Jolt to extract to flowfile attribute?
Created 12-02-2021 10:05 AM
@Griggsy
If you can share a source json, it may help with more specific guidance in the community.
Thanks,
Matt