Support Questions

Find answers, ask questions, and share your expertise

SplitXML child/ output files getting overwritten by putFile processor

avatar

Hi, I am trying to use a very simple process GetFile  SplitXML  PutFile However, putfile throws error as all child files have same names and I get only one copy (first of the selected node depth data or last depending on my putFile conflict resolution strategy) I tried using updateAttribute process to change the file before sending to putFile but even that is not working. Please help.

Any suggestions on why even a simple update filename operation is not working either. Could there be any issue with some settings? I am using nifi 1.7.0

Thanks

1 ACCEPTED SOLUTION

avatar
Master Mentor

@D D

-

The NiFi Split type processor will produce multiple FlowFiles from a single source FlowFile. Each of those split FlowFiles produced will have the same filename assigned to them. NiFi references/keeps track of FlowFiles by a unique UUID assigned to each of them, so the fact that each has the same filename is not an issue for NiFi itself. That being said, destination systems will likely have an issue with duplicate files with the same filename.

-

Using the update attribute processor to change the filename on these splits is the best option here.

Creating a dynamic new property that will update the filename using the FlowFiles unique uuid is the common solution:

80606-screen-shot-2018-07-19-at-123036-pm.png

-

Thanks,

Matt

-

If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@D D

-

The NiFi Split type processor will produce multiple FlowFiles from a single source FlowFile. Each of those split FlowFiles produced will have the same filename assigned to them. NiFi references/keeps track of FlowFiles by a unique UUID assigned to each of them, so the fact that each has the same filename is not an issue for NiFi itself. That being said, destination systems will likely have an issue with duplicate files with the same filename.

-

Using the update attribute processor to change the filename on these splits is the best option here.

Creating a dynamic new property that will update the filename using the FlowFiles unique uuid is the common solution:

80606-screen-shot-2018-07-19-at-123036-pm.png

-

Thanks,

Matt

-

If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.

avatar

Thanks a lot Matt!! It helped.

Also it turns out I was not running NiFi as administrator which was also a problem in renaming files in windows.