FetchSFTP 2.0.0

Bundle
org.apache.nifi | nifi-standard-nar
Description
Fetches the content of a file from a remote SFTP server and overwrites the contents of an incoming FlowFile with the content of the remote file.
Tags
fetch, files, get, ingest, input, remote, retrieve, sftp, source
Input Requirement
REQUIRED
Supports Sensitive Dynamic Properties
false
Properties
Relationships
Name Description
success All FlowFiles that are received are routed to success
comms.failure Any FlowFile that could not be fetched from the remote server due to a communications failure will be transferred to this Relationship.
not.found Any FlowFile for which we receive a 'Not Found' message from the remote server will be transferred to this Relationship.
permission.denied Any FlowFile that could not be fetched from the remote server due to insufficient permissions will be transferred to this Relationship.
Writes Attributes
Name Description
sftp.remote.host The hostname or IP address from which the file was pulled
sftp.remote.port The port that was used to communicate with the remote SFTP server
sftp.remote.filename The name of the remote file that was pulled
filename The filename is updated to point to the filename fo the remote file
path If the Remote File contains a directory name, that directory name will be added to the FlowFile using the 'path' attribute
fetch.failure.reason The name of the failure relationship applied when routing to any failure relationship
Use Cases Involving Other Components
  • Retrieve all files in a directory of an SFTP Server
    Description
    Retrieve all files in a directory of an SFTP Server
    Keywords
    sftp, secure, file, transform, state, retrieve, fetch, all, stream
    Processor Configurations
    org.apache.nifi.processors.standard.ListSFTP
    The "Hostname" property should be set to the fully qualified hostname of the FTP Server. It's a good idea to parameterize     this property by setting it to something like `#{SFTP_SERVER}`.
    The "Remote Path" property must be set to the directory on the FTP Server where the files reside. If the flow being built is to be reused elsewhere,     it's a good idea to parameterize this property by setting it to something like `#{SFTP_REMOTE_PATH}`.
    Configure the "Username" property to the appropriate username for logging into the FTP Server. It's usually a good idea to parameterize this property     by setting it to something like `#{SFTP_USERNAME}`.
    Configure the "Password" property to the appropriate password for the provided username. It's usually a good idea to parameterize this property     by setting it to something like `#{SFTP_PASSWORD}`.
    
    The 'success' Relationship of this Processor is then connected to FetchSFTP.
    
    org.apache.nifi.processors.standard.FetchSFTP
    "Hostname" = "${sftp.remote.host}"
    "Remote File" = "${path}/${filename}"
    "Username" = "${sftp.listing.user}"
    "Password" = "#{SFTP_PASSWORD}"
    
See Also