Split Flat File Destination at X record count

  • Hello...

    I have an SSIS package that is running that is creating an output file that is to big to read in on a third party system. I am trying to figure out how I can break the output into multiple files. So like at 500,000 records go in to FileA, 500,001 to 1,000,000 goes in to FileB and so on. I calculate that there would be four files.

    How can I easily incorporate this logic into my SSIS package. Currently I have the following:

    OLD DB Source

    Row Count

    Conditional Split

    Flat File Destination

  • sqlsponge2 (4/19/2011)


    Hello...

    I have an SSIS package that is running that is creating an output file that is to big to read in on a third party system. I am trying to figure out how I can break the output into multiple files. So like at 500,000 records go in to FileA, 500,001 to 1,000,000 goes in to FileB and so on. I calculate that there would be four files.

    How can I easily incorporate this logic into my SSIS package. Currently I have the following:

    OLD DB Source

    Row Count

    Conditional Split

    Flat File Destination

    An alternative to consider is to send the output to a single file and then break that up at the end of the package. I'm sure there are utilities out there that will make it fairly straightforward.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • You could also potentially use a script component to keep track of the number of rows you're processing and code it so that it opens a new file every X number of rows and writes to that.

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

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