Split the file RRS feed

  • Question

  • my ssis package downloades the text file from Ftp. iT downloades for ex 5 files.

    I want to split the file to smaller file after downloades. If the size of file is more then 600 mB then I want to split it into 6 files.

    please suggest if any task in SSIS can perform this or any other way.


    Monday, October 16, 2006 9:10 AM

All replies

  • Two ways I can see how to do this.

    1 - Use a Script Task and the System.IO namespace stream objects to read the file and write out into several files. Change files based data size, rows or whatever.

    2 - Use a Data Flow, with Flat File source. Then split the flow into several outputs and direct to seperate flat file destinations. There are two ways to do the split that I can think of. You could write a Script Component and have several outputs. Perhaps just use a local variable in the script to act as a row counter and direct rows to the different outputs depending on the row count variable. See the last post in this thread for some code-

    Re: Conditional Split to send top 10, top20, and top 30 in three different flows ? - MSDN Forums

    The other way, which I think is slightly easier is to use the Row Number Transform to add a new row number column. Then use the Conditional Split to point different ranges of rows to different outputs. To get perfectly balenced files, same number row rows in each, you woudl first have to read the file to get the row count, then have a second Data Flow to perform the split. The Conditional Split expressions could be based on the row count versus split number. Use expressions if required to build the conditions.

    Monday, October 16, 2006 10:08 AM
  • In order to split your PST, I would suggest you to go for Stellar Toolkit for Outlook where you can easily manage and split your PST with respect to date and email id. Download its free demo version to check out the preview. 
    Tuesday, November 26, 2019 9:21 AM
  • Split PST Program is an excellent utility which divides large PST file into manageable and smaller PST files as per the specific criterion like size, date, folder, and email id, and protects them from any corruption issues because of file size limits. You can get detail from Visit here:
    Friday, November 29, 2019 5:57 AM
  • if you are searching for best tool which can reduce the large size PST file into small pieces, then I would suggest you to use Split PST Tool. This is cost effective and powerful utility that can instantly reduce the oversize PST files without losing error. The software easily reduces PST size by dividing then into smaller piece. The software divides large and heavy PST files into multiple smaller parts. The software has capability to break entire Outlook database like journals, notes, task, contacts etc. Read more:
    Wednesday, January 29, 2020 10:02 AM