SFTP Task

Introduction

SFTP or Secure File Transfer Protocol is a secure file transfer protocol that uses secure shell encryption to provide a high level of security for sending and receiving file transfers. SFTP task is similar to the FTP task in that it uses AES and other algorithms to protect the data transferred between different systems.

Overview

SFTP task is associated with the core three terms i.e., SFTP Reader, SFTP Writer, and SFTP connection. It allows you to securely share files via SSH File Transfer Protocol plus the accessibility and features that keep your business moving forward.

SFTP tasks have several options for authentication. You can test the connection using a user ID and password, an SSH key, or a password and SSH key combination. This is very beneficial for organizations that need to implement stricter security measures for the file transfer process and user access.

Features of SFTP

  • It helps you to encrypt the data.

  • SFTP task allows you to execute the command.

  • Helps to protect and compress data for transmission.

  • It provides username and password authentication.

  • SFTP task also allows you to improve file upload and download capabilities.

  • It also helps to provide us with a public key authentication.

Benefits of SFTP task

The core benefit of the SFTP task is it helps to improve the multiple transfer process in the automation. It helps to simplify the projects and tasks to run, monitor the file appropriately, exchange data through cloud or web services, improve the file transfer process, and ensure secure file encryption. Besides, the SFTP task also helps to cut down business costs, by simplifying the business process. It eventually enhances accessibility and scalability. Further, the core role of the SFTP task is to ensure a secure environment, that helps to ensure data security. Besides, with the help of the SFTP task, you will get the benefits of convenient file management along with disaster recovery and compliance management.

SFTP Reader

You can use the SFTP Reader task to connect to the SFTP server based on the connection you choose and retrieve the files you need. Once the SFTP reader task is configured, a fixed set of data slots is generated for further use in automation.
The SFTP reader is associated with data slots. Data slots of the SFTP reader task are mentioned below:

  • Filename: Name of the selected file.

  • File: Content of the selected file.

  • Size: Size of the selected file (In bytes).

  • Type: Type of the file (CSV, JSON, TXT, etc.)

How to configure SFTP Reader

  1. Click on the automation page from the Home page of Sapper.

     

 

2. Now choose the required automation from the list, or create a suitable one.

 

3. Drag and drop the SFTP reader task in the automation and click on it. The form will appear on the right side of the screen.

4. Add an appropriate name and description.

 

5. Select the existing connection that has been created for the SFTP source or create a new one from the plus button.

 

6. Now choose the directory path. It’s a location from where you can fetch the data for creating the configuration.

 

7. Specify the readable format in the next input field. Select it by using the file name.

8. You will get the option of using a file name or using a regular expression.

 

9. In the select file input field, you will get the list of all the files present in the directory. Choose the desired one as per your requirement.

10. If you choose “using by file name” you will get an option of “Select file”.

 

11. Now, click on the “Select file” options dropdown and upload the required one from the list.

12. You can search for a specific option from the search bar based on your requirement.

 

13. If you choose “using the regular expression” you will get an option of “Regular Expression”.

 

14. Now, you can add the expression based on your requirement in the “Regular Expression” field.

15. Click on save to complete the configuration.

 

SFTP Writer

The SFTP Writer task allows you to connect to an SFTP server based on the connection you choose and write the required files according to your configuration. After you have configured the SFTP Writer task, you need to name the output file. If the execution is successful, the file or output file written to the specified directory address will be retrieved. In the SFTP Writer, you will also get an option for additional properties. You can add time-related suffixes to the file according to the time stamp associated with the additional properties of SFTP Writer.

 

SFTP writer consists with core two additional properties, i.e., appendTimestamp, and TimestampFormat

  • appendTimestamp: You can add a timestamp using appendTimestamp. This is another type of local file, it’s created to allow you to develop an archive copy of your project locally. If you want a custom timestamp format, you must select Yes in the Value field. If you do not select a value, a default version will be generated. The standard version/default format can be display in a filename_timestamp value format.

  • TimestampFormat: You can change the timestamp format as needed. This property identifies the format of the timestamp that is displayed on the form or maintained by the JSF handler.

The TimestampFormat can provide with a combination of (yyyy-mm-dd-hh-mm-ss) in the value input field.

  • yyyy stands for a year

  • mm stands for the month

  • dd stands for the date

  • hh stands for hour

  • mm stands for a minute

  • ss stands for a second

Example : dd-mm-yyyy-hh-mm-ss : 28-10-2021-02-20-07.

Here, 30-10-2021 is representing the date, month, and year and 05-30-07 is time respectively i.e., 5 hours 30 minutes, and 7 seconds.

How to configure SFTP Writer

  1. Click on the automation page from the Home page of Sapper.

2. Now choose the required automation from the list, or create a suitable one.

3. Drag and drop the SFTP writer task in the automation and click on it. The form below will appear on the right side of the screen. 

4. Add an appropriate name and description.

 

 

5. Select the existing connection that has been created for the SFTP sink or create a new one from the plus button.

 

6. Now, add the directory path. It’s a location where the output data will get saved. You need to provide the particular location for the computer file.

 

 

7. Now add the name of the file that you want to writer in the “File Name” field.

 

8. Now, to select the file content you need to click on the “File Content” field.

9. Add the required content in the mentioned field.

10. Now, click on save to complete the configuration.

 

How to use Additional Properties

  1. To use the additional properties in the SFTP writer, you need to click on the “Configure Additional Properties”, from the bottom of the appeared form.

 

2. Once you will click on the “Configure Additional Properties”, a new form will be appear on the screen.

3. This form is associated with two options i.e., appendTimestamp, and TimestampFormat.

 

4. If you choose appendTimestamp option from the dropdown, you will get the option for value and action.

 

5. You need to select yes on the value field if you need a customized appendTimestamp.

6. You can delete the appendTimestamp format from the “Action” field , based on your requirements.



 

7. You can modify the time stamp format as per your requirements.

8. The format of the value can be JSF handler. It can be a combination of (yyyy-mm-dd-hh-mm-ss) in the value input field.

9. You can delete the timestamp from the “Action” field.

10. Click on save to configure the additional properties.

 

Key

Description

Example

Key

Description

Example

Property

The property field is associated with the core aspects of the SFTP additional properties.

appendTimestamp, and TimestampFormat.

Value

In the value field the core value of the appendTimestamp, and TimestampFormat will be display.

yes or no, time format.

Action

Action field provide the delete option for the additional properties.

 

SFTP Connection

The SFTP stands for SSH File Transfer Protocol or Secure File Transfer Protocol. The core benefit of SFTP connection is it’s higher security. It is much secure than FTP connection. Therefore, SFTP has been chosen as the most suitable method for establishing a secure connection for the organization’s file transfer. It ensures higher protection for transferring the files among the organization. It is encrypted which makes the file/data transfer safe. SFTP does not require two-factor authentication. However, it does provide the ability to require both a user ID and password. This option allows for a more secure connection. The SSH key prevents fraudsters from connecting to the SFTP server via SFTP. Ultimately, the SFTP connection provides secure file access, file transfer, and file management capabilities over a trusted data stream.

Benefits of SFTP Connection

  • Increase Speed and Efficiency of File Sharing 

  • Reduce the Risk of Data Corruption while transferring files

  • Enhance Overall Security

  • Ensure higher security for data transfer

How to configure SFTP Connection

  1. Click on the “Connection” tab from the sapper home page.

2. From the “Connections” tab select the “Create Connection” option.

 

3. Once, you click on the “Create Connection” form will be appear on the screen.

 

4. To create the connection choose the required application from the “Select Application” drop down.

5. You can search for the particular application from the search field.

 

6. Now, choose “SFTP” in the “Connection Type” section. Select it from the drop down.

 

7. Once you select the “Connect Type” the below field will be visible on the screen.

8. Now, provide a “Connection Name” and “Connection Description” as per the requirement.

9. The “Authentication Type” is “Basic” by default. Select it from the dropdown.

 

 

10. Provide the “Hostname” (the device/system connected with a network).

 

 

11. Now, fill the “Port” section with the appropriate port number. SFTP uses port 22.

 

12. In the “User Name and “Password” input fields provide the appropriate username and password for securing the connection.

13. Now click on save to save the connection’s configuration. Once a connection is successfully created it can be used in any automation.

 

Key

Description

Example

Key

Description

Example

Authentication Type

The authentication type specifies the security protocol to be used for sending your user name and password to the server to establish a network connection.

Basic

Hostname

Each device has a hostname assigned by a network. Hostname is a unique name or label assigned to any device that is connected to a specific computer network.

174.129.23.101

Port

The port is a docking point that is used to connect an external device with the system.

22

Username

A username allows you to maintain your personal identification when you use the particular application or connection.

sapper_user

Password

The requirement of Passwords is to protect your sensitive information's. It’s can be generated with a unique combination of numerical and alphabetic characters.

***************