unzip flat file in SSIS

  • Hi All,

    i have a requirement where , i need to read the flat file and load my target table . But the problem is, the flat file is zipped and sent us . i want to know -

    1. how to unzip a flat file

    2. i need to unzip only when the entire file comes in.( i shouldnt unzip when the file ftp is still in progress)

    can anyone provide solutions for this

    Thanks

  • any ideas ppl?

  • I did a search in this forum for unzip and came across this article:

    http://www.sqlservercentral.com/Forums/Topic299502-148-1.aspx?Highlight=unzip

    It might get you started.

  • Hi,

    I haven't tested, but I don't believe you should have any problems as far as waiting for the file to finish transfering. The FTP task won't complete until the transfer is finished (please correct me if I'm wrong :D).

    There are various zip tools out there (PKZIP, 7z & winzip to name a few) that have command line utilities. Whilst you can write a script component to build the command line for the zip utility, in SSIS you don't have to do this as you have an expression language which will simplify this task for you. It is preferable to do this as debugging is easier & the package is simpler.

    Use an "Execute Process" task to unzip these when the FTP task is finished. The task has various properties that can be set by an expression including the command arguments. It is this property which you can dynamically configure at run time to deal with a changing filename or destination that you will have in your various environments.

    HTH

    Kindest Regards,

    Frank Bazan

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply