nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chandu Koripella <>
Subject RE: Content replacement
Date Fri, 04 Dec 2015 20:26:28 GMT
Thanks Joe,

I believe I tried this option earlier. As you notice I have 4 groups in the regular expression.
I tried with all four groups. Nothing gets replaced in the put file.

Group4 is 4 digit year, group3 is 3 digit month, group2 is date and group1 is ddMMMyyyy


From: Joe Witt []
Sent: Thursday, December 03, 2015 7:00 PM
Subject: Re: Content replacement

Your use case description was excellent and helped expose a powerful and simple feature enhancement.


On Thu, Dec 3, 2015 at 9:21 PM, Joe Witt <<>>

In building a template to support this I'm finding it more involved than desired.  If I get
that done will post it unless someone else does so sooner.  However, the only reason it is
more involved than I'd like is that the ReplaceText processor does almost everything we need
here.  It can be in line mode to do the eval/replace on a per line basis and it can extract
groups from the matching line and use those groups to format a new output.  However, the difficulty
in your example is that we cannot take that date string and convert it to a date and then
format it back to a string (right now).  So will take a look at how we could better support
the use case as well.

Something else of note is that there are a couple of folks working on scripting processors
so you could break into a convenient script to help tackle some cases like this as well.

Will dig a bit more and respond.


On Thu, Dec 3, 2015 at 8:20 PM, Chandu Koripella <<>>

I am very new to the nifi and evaluating to use to do simple transformations. I am trying
to convert date format from ddMMMyyyy to  yyyy/mm/dd using replace text option. I don’t
find many options to do content replacement in the documentation. it is more focused for attribute

Hsere is my simple file format. how do I transform the data in col3? I appricaiate any help.



View raw message