Support Questions

Find answers, ask questions, and share your expertise

NIFI splittext to split the single file into multiple

avatar
New Contributor

I split the file successfully using splitText into three file but when I try store using putfile its throwing error as 'file with same name'. Please suggest which processor do I need to use to save the files in same directory. I used update attribute to update file name but it still throwing the same error

1 ACCEPTED SOLUTION

avatar
Guru

Suggestion is to use UpdateAttribute to append timestamp to filename.

Here is an example of how to do this:

9915-screen-shot-2016-11-30-at-72542-am.png

If this is what you are looking for, let me know by accepting the answer; else, let me know of any gaps or followup questions.

View solution in original post

3 REPLIES 3

avatar
Guru

Suggestion is to use UpdateAttribute to append timestamp to filename.

Here is an example of how to do this:

9915-screen-shot-2016-11-30-at-72542-am.png

If this is what you are looking for, let me know by accepting the answer; else, let me know of any gaps or followup questions.

avatar
Master Guru

Depending on how fast the flow files are coming through, using the timestamp might result in the same filename as well. You could use ${uuid}, which is the UUID of the flow file (guaranteed to be unique), or ${nextInt()}, which is an auto-incrementing value

avatar
New Contributor

Thank You @Matt Burgess and @greyKeys . Previously I used timestamp which results in error, then I changed it to ${uuid} its working fine.