blob: b143ffcaa761b88c3b1387111dae9d0194c5a45a [file] [log] [blame]
////
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
////
:documentationPath: /plugins/actions/
:language: en_US
:page-alternativeEditUrl: https://github.com/apache/incubator-hop/edit/master/plugins/actions/sftp/src/main/doc/sftp.adoc
= Get a file with SFTP
== Description
The Get a file with SFTP action can be used to retrieve one or more files from an FTP server using the Secure FTP protocol.
== Options
=== General Tab
[width="90%", options="header"]
|===
|Option|Description
|Workflow action name|The name of the workflow action. *Note*: This name has to be unique in a single workflow. A workflow action can be placed several times on the canvas, however it will be the same workflow action.
|SFTP-server name / IP|The name of the SFTP server or the IP address
|Port|The TCP port to use. This is usually 22
|User name|The user name to log into the SFTP server
|Password|The password to log into the SFTP server
|Use private keyfile|Indicates whether or not a private keyfile is to be used.
|Private key filename|If "Use private keyfile" is checked then this field is enabled. The file can be browsed to using the browse button to the right of the field. The Private Key should be in the PEM file format. For PuTTY-based Private Keys, use PuTTYgen to convert the file into "OpenSSH" format.
|Key passphrase|If "Use private keyfile" is checked then this field is enabled. If a passphrase is required then enter it here.
|Remote directory|The remote directory on the SFTP server from which we get the files
|Target directory|The directory on the machine on which Hop runs in which you want to place the transferred files
|Wildcard a|Specify a regular expression here if you want to select multiple files. For example:
[source,bash]
----
.*txt$ : get all text files
A.*[ENG:0-9].txt : files tarting with A ending with a number and .txt
----
|Remove files after retrieval?|Remove the files after they have been successfully transferred.
|===
=== Files Tab
[width="90%", options="header"]
|===
|Option|Description
|Copy previous results to args|If files to send are dynamically generated by another pipeline or if you want to identify files to sent, check this option.
Hop will select files list from previous result rows (not result files) and send theses files.
|Remote Directory|The remote directory on the SFTP server from which we get the files. Use the "test folder" button to connect to the remote server and validate that the folder exists.
|Wildcard (regular expression) a|Specify a regular expression here if you want to select
multiple files. For example:
[source,bash]
----
.*txt$ : get all text files
A.*[ENG:0-9].txt : files tarting with A, ending with a number and .txt
----
|Remove files after retrieval|Delete the remote file after the file is transferred.
|Target Directory|The directory on the machine on which Hop runs in which you want to place the transferred files
|Create target folder|Check this option if the destination folder does not exist and should be created.
|Add filenames to result|If checked the name of the file is added to the result stream.
|===