Chandru, Correct what you're trying doesn't work just yet. But once this [1] is reviewed and pushed to master we should have your original request covered quite nicely.
[1] https://issues.apache.org/jira/browse/NIFI-1249 Thanks Joe On Fri, Dec 4, 2015 at 3:26 PM, Chandu Koripella <[email protected]> wrote: > 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 [mailto:[email protected]] > *Sent:* Thursday, December 03, 2015 7:00 PM > *To:* [email protected] > *Subject:* Re: Content replacement > > > > Your use case description was excellent and helped expose a powerful and > simple feature enhancement. > > > > https://issues.apache.org/jira/browse/NIFI-1249 > > > > Thanks > > Joe > > > > On Thu, Dec 3, 2015 at 9:21 PM, Joe Witt <[email protected]> wrote: > > Chandu, > > > > 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. > > > > Thanks > > Joe > > > > On Thu, Dec 3, 2015 at 8:20 PM, Chandu Koripella <[email protected]> > wrote: > > HI, > > > > 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 > manipulation. > > > > > > Hsere is my simple file format. how do I transform the data in col3? I > appricaiate any help. > > > > > > Thanks, > > Chandu > > > > >
