Load raw text files to sql tables through SSIS

ASHISH SINGH 21 Reputation points
2021-06-24T02:44:46.2+00:00

There are bunch of files coming in through zipx with password , and we need to unzip the files and load to different target tables. Also i want to log all information in text files during SSIS execution like

Unzip time of particular file and all files.
Name of Particular file and all files.
record count of particular files including all files.

Pls help how i can setup SSIS to do above task.

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,467 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ZoeHui-MSFT 33,551 Reputation points
    2021-06-24T08:34:49.127+00:00

    Hi @ASHISH SINGH ,

    Using Execute Process Task we could unzip the files.

    108961-6241.jpg

    To record the name of particular file and unzip time of particular file and all files, we may use Foreach Loop Container and Execute SQL Task to realize the need.

    Here is a detail tutorial for your reference watch.

    To record count of particular files including all files, we may use the Script Task with VB code.

    Dim counter As _  
    System.Collections.ObjectModel.ReadOnlyCollection(Of String)  
    counter = My.Computer.FileSystem.GetFiles("C:\TestDir")  
    MsgBox("number of files is " & CStr(counter.Count))  
    

    Hope it could give some idea.

    Regards,

    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October

    0 comments No comments