I've worked out how to pull down information from online json and parse the basics into attributes and write those out to a file. I would like to split one of those attributes from 1 to two different attributes....This seems basic to me, but for the life of me I can't seem to work out the logic in NiFi
attribute1 = 2016-06-13T11:52:19-05:00
I'd like to split that on the T into two attributes like the following:
In Python this is just date, time = timestamp.split('T', 1), but alas Nifi is eluding me with the end goal is to write this out into a flat file or Hive, but either way there are a bunch of needs I'll have for something like the above split.
I would use replacetext processor. more info here.
Updates the content of a FlowFile by evaluating a Regular Expression (regex) against it and replacing the section of the content that matches the Regular Expression with some alternate value.
you would search for the value and replace with output $1, $2, etc.
You can also use replaceTextWithMapping.
Updates the content of a FlowFile by evaluating a Regular Expression against it and replacing the section of the content that matches the Regular Expression with some alternate value provided in a mapping file.