SSIS - How to Use FTP Task [Download File from FTP Site]

Scenario:

Let's say we have to download different files from FTP Task. We want to create one package that can take FolderName/FileName.extension as Variable value and then can download that file to our Local Folder.

Solution:

We can use FTP Task in SSIS to achieve this. Here is step by step approach to create SSIS Package.
To perform a demo , I am using ftp.microsoft.com and we will download readme.txt file from the ftp site

Step 1: 
Create Variable "FolderNameFileName" in your SSIS Package of Type String. Provide the FolderName/FileName.ext as shown below

FolderNameFileName =" /softlib/readme.txt"


Step 2: 
Bring FTP Task to Control Flow Pane and Configure as shown below


 Final Output:
Once you run package, package will read Variable value for Folder and File and download the file to Destination Folder.

SSIS Configuration can be used to set the value of variable or we can set the value of variable in SQL Server Agent where Package will be scheduled.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.