You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/03/26 00:43:44 UTC

[GitHub] [nifi] ijokarumawak edited a comment on issue #3375: NIFI-5979 : enhanced ReplaceText processor with "Number of Occurrences" and "Occurrence offset" configurations

ijokarumawak edited a comment on issue #3375: NIFI-5979 : enhanced ReplaceText processor with "Number of Occurrences" and "Occurrence offset" configurations
URL: https://github.com/apache/nifi/pull/3375#issuecomment-476429999
 
 
   Hi @pushpavanthar thanks for the PR!
   
   I reviewed the code change, and posted few comments. I haven't tested this improvement in action though.
   
   Would you share some use-cases where the number of occurrences and offset are required?
   
   The reason why I ask that is, on the NIFI-5979 JIRA description, Adam mentioned he wanted to replace only the first line of a CSV file. I feel the proposed changes with this PR looks overkill to realize the requested feature. Since ReplaceText is widely used, we should be super defensive to not introduce other issues.
   Also, if a text contains target values `N` times. How does a user know the number when they configure this processor? I'm probably missing something, but I can't imagine situations well where the `N` is a static constraint.
   
   Alternatively, we may be able to add new `Evaluation Mode` such as `The First Line` and `The Last Line`, as I see few other users wanted to replace only header or footer of a text file.
   
   How do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services