question

ASHISHSINGH-6178 avatar image
0 Votes"
ASHISHSINGH-6178 asked ZoeHui-MSFT answered

Load raw text files to sql tables through SSIS

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ZoeHui-MSFT avatar image
0 Votes"
ZoeHui-MSFT answered

Hi @ASHISHSINGH-6178,

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



6241.jpg (53.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.