Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Help required!!.

Requirement
I have a StoredProc it returns the 10 Million records. In this case 10 Million records it may increase/decrease..

So in this scenario,we need create a SSIS Package for multiple csv files.

In this Ex .if 10Million Records then 10 csv files, each file should create with 1 million records

done as below, its working fine but taking more time.

steps:
--------
1. Script Task: is used to generate the Folder path with date and time
2.file system Task:Create Folder if Doesn't Exists based on script task file path.
3.Data Flow Task
a.Flat File Source to be set it up
b.Script Component:here i am using SP to return the results based on results, i am splitting the main result table to 10 tables(each table contains 1million records) and looping through the 10 tables.
c.In that loop we are creating the csv file based on that table.

Working as expected but its very long time to create 10 csv files .so wanted to check if any other scenario's. Please help on this.


Thanks,
Murali
Posted
Updated 25-Aug-14 22:45pm
v6

you have to use for loop container for creating multiple CSV files.

Please check below link - http://stackoverflow.com/questions/7352104/create-multiple-flat-file-from-running-same-query-with-different-criteria[^]
 
Share this answer
 
Please find the below link to get the solution perfectly.

http://social.technet.microsoft.com/wiki/contents/articles/3172.split-a-flat-text-file-into-multiple-flat-text-files-using-ssis.aspx[^]


And here major drawback is OLEDB source executes based on result count

for Ex: SP returns 10million Records and our splitting count value is 1million then 10 times this SP Excutes and process the 10 csv output files.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900