SQL 2005: SQL Server Integration Services
Data Export
By: Zack Turnbow
Introduction
Continuing in this SSIS introduction series, I will be covering how to export data, more specifically how to export data to a flat file. I am still building on the previous articles so if you missed out on those, please get familiar with them first.
Server Intellect offers Windows Hosting Dedicated Servers at affordable prices. I'm very pleased!
Implementation
First, create a new package in the SSIS project. Since much of the same functionality is being used from the previous package, I will show a quick way to move functionality from one package to another. Load the Sort package with the Control Flow as the active tab. Right click on the Data Flow Task and select copy. Move back over to the new project and in the Control Flow paste the copied Data Flow Task into the work area. Click over to the Data Flow work area and all of the components from the Sort package will be there. The only item(s) that are not copied are the connections from the Connection Manager area. Re-create the Vendor A and Vendor B connections and re-configure each Flat File Source.
[Click to see full-size]
Now it is time to make use of the Flat File Destination component. Find it in the toolbox and drag into the work area. Connect the output of the Merge component to the Flat File Destination component.
[Click to see full-size]
As with any source or destination components, a connection needs to be created, so right click in the Connection Manager area to create a Flat File connection. As you can expect, it’s the same as create a Flat File connection for the Flat File Source components. The file doesn’t have to exist yet so all that is needed is the correct file path and name.
[Click to see full-size]
Try Server Intellect for Windows Server Hosting. Quality and Quantity!
[Click to see full-size]
Make sure to view the Columns tab to have the connection manager perform a test parse of the file. Since the connection is ready to go, open up the editor for the Flat File Destination. On the first tab, select the newly create flat file connection from the list. Next, go to the mappings tab and make sure the column mappings are correct.
[Click to see full-size]
Testing the Package
As before, if there are no configuration issues, it is time to test the package.
[Click to see full-size]
Server Intellect assists companies of all sizes with their hosting needs by offering fully configured server solutions coupled with proactive server management services. Server Intellect specializes in providing complete internet-ready server solutions backed by their expert 24/365 proactive support team.
After the packages runs, go to the directory that you configures for the Flat File connection. There you will find the file that the package created. Open it up in your favorite text view and you will see a list of all the items processed.
[Click to see full-size]
What have we learned?
How to configure a Flat File Destination component.
How to export data to a file.
Attachments
|