The SSIS FTP Task is used to perform a different kinds of operations on Files and Folders (or Directories). For instance, if you want to send or receive the files from FTP Server to a local directory, we can use this SSIS FTP Task.
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 in 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 Task Functionality. It is always a good practice to provide a valid description.
Within the 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 happen when click on the <New Connection..> option
Once you click on the <New Connection..> option, FTP Connection Manager will be opened to configure the connection settings. Please refer SSIS 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 then, FTP task will fail when there is an issue in FTP operation
- When you set this property to FALSE then, SSIS FTP task will not fail even there is an issue in 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 below screenshot
|Send Files||This will send files from Local Computer to FTP Server. Please refer to the FTP Task Send Files article to send a single file and the SSIS FTP Task Send Multiple Files article to send multiple files.|
|Receive Files||It import files from remote directory to the local computer. Please refer to the SSIS 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 directory (or folder) on the local computer. Please refer SSIS 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 SSIS FTP Task Create Remote Directory to Create 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 Local Directory.|
|Remove Remote Directory||Use this option to delete the directory in the remote FTP Server. Please refer to the SSIS FTP Task Delete Remote Directory to delete remote Directory.|
|Delete Local Files||This will delete files on the local computer. Please refer SSIS FTP Task Delete Local Files article to delete files from the local file system.|
|Delete Remote Files||It delete files on the FTP Server. Please refer FTP Task Delete Remote Files article to delete files from FTP Server.|
SSIS FTP Task Local Parameters
IsLocalPathVariable: This property has two options: True and False. If we set this property to true, then the local path is stored in a variable. If we set this property to false, we have to select the local path manually using File Connection Manager.
When we set the IsLocalPathVariable to a true, new property called LocalVariable will appear.
LocalVariable: This property displays all the available user variables. Please select the appropriate variable which is holding the Local Path (File or Folder path). If you haven’t created any variable, please click on the <New Variable..> as shown in the below screenshot.
Once you click on the <New Variable..>, it will open the new window called Add Variable to create the new variable. Here you can create the new variable which will hold the local source path.
When you set the IsLocalPathVariable to False, then we have to configure the Source Connection using LocalPath Property. If you 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 by selecting <New Connection..>.
Once you selected the <New Connection..> for files and folders, the File Connection Manager Editor will be opened in a new window. Using this editor, we have to configure the connection with files and folders.
Once you 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 have to access the Remote path from the variable. If we set this property to false, we have to select the Remote path manually using FTP Connection Manager (which we created in our General Tab).
When we set the SSIS FTP Task IsRemotePathVariable to False, we have to configure the remote Connection using RemotePath Property. Please click on 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 are choosing 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.