Introduction
This tutorial explains how to split data exported from SQL Server into multiple CSV files using the ZappySys SSIS Export CSV File Task. Splitting files is useful when handling large datasets or when you need separate files for specific groups or categories, such as country, region, or customer.
Prerequisites
- Download and install the ZappySys SSIS PowerPack
Steps
-
In your SSIS package, go to the Control Flow tab and drag the ZappySys Export CSV File Task from the toolbox.
-
Open the task and configure or create a connection manager for your SQL Server instance.
-
Enter the SQL query that selects the data you want to export, or pick a table from the database.
-
On the Target tab, specify the output folder path. The task can automatically generate file names if only the folder path is given.
-
Enable Overwrite target file(s) if you want to replace any existing files.
-
Open the Split Options tab and check Split by size/rows.
-
Choose whether to split by size or rows, and enter the value that defines the limit.
-
Optionally, use the Group by column option to create one or more files for each unique value in the selected column.
-
Save the configuration and close the editor.
-
Save and run the SSIS package.
-
The following example shows results when splitting by 100 rows and grouping by the
Discount
column. Each unique discount value produces one or more files, each containing up to 100 rows.
-
If you skip the Group by column option, files will be generated in sequence, each with the defined maximum row count.
Conclusion
The SSIS Export CSV File Task provides a straightforward way to split SQL Server data into multiple CSV files. You can control file size or row count and optionally split by a column value, which is helpful for creating grouped datasets or segmented exports. This makes it easier to manage and distribute data in smaller, structured files.
Visit our official page to start building smarter, faster, and more scalable solutions with ZappySys.
References
Contact us
If you encounter any issues or have specific questions, reach out to our support team via live chat or support ticket using our email support@zappysys.com.