[ 
https://issues.apache.org/jira/browse/NIFI-3555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906273#comment-15906273
 ] 

Puspendu Banerjee commented on NIFI-3555:
-----------------------------------------

[~uwegeercken] Hi! The expression , input and output sample doesn't match, may 
be underscores {noformat}'_'{noformat} before and after the "fragment" literal 
got lost during saving the ticket. 
Please provide correct expression and here goes my scenario, which is working 
correctly:
{noformat}
Expression-->${fname:substringBefore('.'):append('_fragment_'):append(${fragment.index}):append('_details.csv')}<--
Original fname-->allCountries_100.txt<--
Updated fname-->allCountries_100_fragment_33_details.csv<--
{noformat}

> UpdateAttribute on filename adds extra space
> --------------------------------------------
>
>                 Key: NIFI-3555
>                 URL: https://issues.apache.org/jira/browse/NIFI-3555
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core UI
>    Affects Versions: 1.1.1
>         Environment: Linux, Fedora 25, Nifi 1.1.1
>            Reporter: Uwe Geercken
>            Priority: Minor
>
> I have used the GetFile and then SplitText processors to split a csv file 
> into rows.
> Here is the original filename:
> allCountries_100.txt
> Then I have created an Expression in the UpdateAttribute processor:
> ${filename:substringBefore('.'):append('_fragment_'):append(${fragment.index}):append('_details.csv')}
>  
> It creates a new filename by using the original filename plus the fragment 
> number from the SplitText processor and adds a string at the end.
> In the output of the PutFile processor all files have an extra space at the 
> end behing the ".csv".
> here is an example:
> allCountries_100_fragment_35.csv 
> please note the extra space at the end.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to