9

Background

I have a workflow that uses a FetchFile processor, some intermediary processors (e.g. RouteOnAttribute, HashContent, etc.), and then a PutFile processor.

Throughout it all, the content is not being manipulated.

Issue/Problem

The PutFile processor is saving files using a timestamp, NOT the original filename.

Question

How can I either:

  1. Get the PutFile processor to use the original filename? or
  2. Specify the filename that the PutFile processor will use?
Dan
  • 4,197
  • 6
  • 34
  • 52
  • 1
    You can check the part of "Reads Attributes" in the manual https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.6.0/org.apache.nifi.processors.standard.PutFile/index.html – KyungHoon Kim Apr 22 '19 at 01:43

1 Answers1

19

The PutFile processor will save the content in a file with the filename based on the filename attribute on the flowfile. You can use an UpdateAttribute processor to provide whatever value you like for this attribute.

GetFile will read the original filename of the file on disk into this attribute, but because FetchFile expects the filename as an incoming attribute on the flowfile, it does not write the value back as an attribute.

Andy
  • 13,916
  • 1
  • 36
  • 78