The SSIS FTP Task is used to perform different kinds of operations on Files and Folders (or Directories). For instance, we can use this SSIS FTP Task if you want to send or receive the files from the FTP Server to a local directory.
The SSIS FTP Task uses the FTP Connection Manager to connect with the Remote (FTP Server) Files and Folders.
Before we start configuring the SSIS FTP Task, Let us see the files and folders available on our FTP Server. The below screenshot will show the same.
Configure SSIS FTP Task
First, Drag and drop the FTP Task into the Control Flow region and rename it as SSIS FTP Task.
Double click on it will open the SSIS FTP Task Editor to configure it.
- Name: Please provide the Unique Name
- Description: Briefly describe the SSIS Task Functionality. It is always a good practice to provide a valid description.
Within the SSIS FTP Task Connection section, We have one property called FTPConnection:
- FTPConnection: By clicking on the drop-down arrow, show you the already created FTP Connections (If any). Or please click on the <New Connection..> option to create one. Let us see what happens when you click on the <New Connection..> option.
Once you click on the <New Connection..> option, FTP Connection Manager will open to configure the connection settings. Please refer to the FTP Connection Manager article to understand the connection settings.
StopOnFailure: This property holds two options: TRUE and FALSE.
- If you set this property to TRUE, it will fail when there is an issue in the FTP operation.
- When you set this property to FALSE, the SSIS FTP task will not fail, even if there is an issue in the FTP operation.
Please click on the File Transfer tab to configure the FTP operations. The following screenshot shows the available properties in this tab. Within the Operation section, we have the IsTransferAscii option.
- IsTransferAscii: This property has two options: True and False. If we set this property to true, the FTP task uses ASCII mode for its operations.
The FTP task in SSIS supports eight different operations on Files and Folders. Please see the available options in the below screenshot.
Operations
FTP Operation | Description |
---|---|
Send Files | It will send files from the Local Computer to FTP Server. Please refer to the FTP Task Send Files article to send a single file and the FTP Task Send Multiple Files article to send multiple files. |
Receive Files | It imports files from the remote directory to the local computer. Please refer to the FTP Task Receive Files to receive a single file and the FTP Task Receive Multiple Files article to receive multiple files. |
Create Local Directory | Using this option, we can create the local computer’s directory (or folder). Please refer to the FTP Task Create Local Directory article to Create Local Directory. |
Create Remote Directory | Using this option, we can create the directory (or folder) in the FTP server. Please refer to the FTP Task Create Remote Directory to Create a remote Directory. |
Remove Local Directory | It removes the directory (or folder) on the local computer. Please refer to the FTP Task Delete Local Directory to delete the Local Directory. |
Remove Remote Directory | Use this option to delete the directory in the remote FTP Server. Please refer to the Delete Remote Directory to delete the remote Directory. |
Delete Local Files | It will delete files on the local computer. Please refer to the Delete Local Files article to delete files from the local file system. |
Delete Remote Files | It deletes files on the FTP Server. Please refer to the Delete Remote Files article to delete files from the Server. |
SSIS FTP Task Local Parameters
IsLocalPathVariable: This property has two options: True and False. If we set this property to true, the local path is stored in a variable. If this property is false, we must manually select the local path using File Connection Manager.
When we set the IsLocalPathVariable to true, a new property called LocalVariable will appear.
LocalVariable: This property displays all the available user variables. Please select the appropriate variable holding the Local Path (File or Folder path). If you haven’t created any variable, please click the <New Variable..> shown in the screenshot below.
Once you click on the <New Variable..>, a new window called Add Variable will open to create the new variable. Here, you can create a new variable, which will hold the local source path.
When you set the IsLocalPathVariable to False, we have to configure the Source Connection using the LocalPath Property. If you have already created the File Connection Manager, you can select it from the drop-down list.
If you haven’t created any connection Manager before, You have to create one by selecting <New Connection..>.
Once you select the <New Connection..> for files and folders, the File Connection Manager Editor will open in a new window. We have to configure the connection with files and folders using this editor.
Once you have selected the required file, Click on the OK button
Configure SSIS FTP Task Remote Parameters
IsRemotePathVariable: This property has two options: True and False. If we set this property to true, we must access the Remote path from the variable. If we set this property to false, we must manually select the Remote path using FTP Connection Manager (which we created in our General Tab).
When we set the SSIS FTP Task IsRemotePathVariable to False, we must configure the remote Connection using RemotePath Property. Please click the browse (…) button beside this option to open the remote directory. From the below screenshot, you can observe the / as the location because it is the root directory of the FTP server. Currently, we don’t have any folders to select. So, we chose the root directory as the location to receive the file from the local computer.
OverwriteDetination: This property has two options: True and False. If we set this property to true, the SSIS FTP Task overwrites the existing files in the Destination path.
Click OK to finish configuring SSIS FTP Task Editor.