Class FetchSFTP

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processor.util.file.transfer.FetchFileTransfer
org.apache.nifi.processors.standard.FetchSFTP
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor

@InputRequirement(INPUT_REQUIRED) @Tags({"sftp","get","retrieve","files","fetch","remote","ingest","source","input"}) @CapabilityDescription("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.") @SeeAlso({GetSFTP.class,PutSFTP.class,GetFTP.class,PutFTP.class}) @WritesAttribute(attribute="sftp.remote.host",description="The hostname or IP address from which the file was pulled") @WritesAttribute(attribute="sftp.remote.port",description="The port that was used to communicate with the remote SFTP server") @WritesAttribute(attribute="sftp.remote.filename",description="The name of the remote file that was pulled") @WritesAttribute(attribute="filename",description="The filename is updated to point to the filename fo the remote file") @WritesAttribute(attribute="path",description="If the Remote File contains a directory name, that directory name will be added to the FlowFile using the \'path\' attribute") @WritesAttribute(attribute="fetch.failure.reason",description="The name of the failure relationship applied when routing to any failure relationship") @MultiProcessorUseCase(description="Retrieve all files in a directory of an SFTP Server",keywords={"sftp","secure","file","transform","state","retrieve","fetch","all","stream"},configurations={@ProcessorConfiguration(processorClass=ListSFTP.class,configuration="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}`.\nThe \"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}`.\nConfigure 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}`.\nConfigure 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}`.\n\nThe \'success\' Relationship of this Processor is then connected to FetchSFTP.\n"),@ProcessorConfiguration(processorClass=FetchSFTP.class,configuration="\"Hostname\" = \"${sftp.remote.host}\"\n\"Remote File\" = \"${path}/${filename}\"\n\"Username\" = \"${sftp.listing.user}\"\n\"Password\" = \"#{SFTP_PASSWORD}\"\n")}) public class FetchSFTP extends FetchFileTransfer
  • Field Details

    • PORT

      private static final org.apache.nifi.components.PropertyDescriptor PORT
    • DISABLE_DIRECTORY_LISTING

      private static final org.apache.nifi.components.PropertyDescriptor DISABLE_DIRECTORY_LISTING
    • PROPERTY_DESCRIPTORS

      private static final List<org.apache.nifi.components.PropertyDescriptor> PROPERTY_DESCRIPTORS
  • Constructor Details

    • FetchSFTP

      public FetchSFTP()
  • Method Details

    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class FetchFileTransfer
    • migrateProperties

      public void migrateProperties(PropertyConfiguration config)
    • createFileTransfer

      protected FileTransfer createFileTransfer(org.apache.nifi.processor.ProcessContext context)
      Specified by:
      createFileTransfer in class FetchFileTransfer
    • customValidate

      protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext)
      Overrides:
      customValidate in class org.apache.nifi.components.AbstractConfigurableComponent