Skip to main content

PutFile

Description

Writes the contents of a FlowFile to the local file system

Tags

archive, copy, files, filesystem, local, put

Properties

In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Directory *DirectoryThe directory to which files should be written. You may use expression language such as /aa/bb/${path}

Supports Expression Language, using FlowFile attributes and Environment variables.
Conflict Resolution Strategy *Conflict Resolution Strategyfail
  • replace
  • ignore
  • fail
Indicates what should happen when a file with the same name already exists in the output directory
Create Missing Directories *Create Missing Directoriestrue
  • true
  • false
If true, then missing destination directories will be created. If false, flowfiles are penalized and sent to failure.
Maximum File CountMaximum File CountSpecifies the maximum number of files that can exist in the output directory
Last Modified TimeLast Modified TimeSets the lastModifiedTime on the output file to the value of this attribute. Format must be yyyy-MM-dd'T'HH:mm:ssZ. You may also use expression language such as ${file.lastModifiedTime}.

Supports Expression Language, using FlowFile attributes and Environment variables.
PermissionsPermissionsSets the permissions on the output file to the value of this attribute. Format must be either UNIX rwxrwxrwx with a - in place of denied permissions (e.g. rw-r--r--) or an octal number (e.g. 644). You may also use expression language such as ${file.permissions}.

Supports Expression Language, using FlowFile attributes and Environment variables.
OwnerOwnerSets the owner on the output file to the value of this attribute. You may also use expression language such as ${file.owner}. Note on many operating systems Nifi must be running as a super-user to have the permissions to set the file owner.

Supports Expression Language, using FlowFile attributes and Environment variables.
GroupGroupSets the group on the output file to the value of this attribute. You may also use expression language such as ${file.group}.

Supports Expression Language, using FlowFile attributes and Environment variables.

Dynamic Properties

This component does not support dynamic properties.

Relationships

NameDescription
failureFiles that could not be written to the output directory for some reason are transferred to this relationship
successFiles that have been successfully written to the output directory are transferred to this relationship

Reads Attributes

NameDescription
filenameThe filename to use when writing the FlowFile to disk.

Writes Attributes

This processor does not write attributes.

State Management

This component does not store state.

Restricted

Required PermissionExplanation
write filesystemProvides operator the ability to write to any file that NiFi has access to.

Input Requirement

This component requires an incoming relationship.

System Resource Considerations

This component does not specify system resource considerations.

See Also

FetchFile, GetFile