SSIS: Table to Text file

Creating an SSIS Package to consume a table and write the recordset into a text file.

Rename package to match project
Next, Create data source allowing access to sql table. create connection manager.

1-table-to-text-file

Next, select the source database.
Create a data flow task and give it a name indicating its purpose.

3-table-to-text-file

Double-click the task to edit it and add a connection manager for the database.
Drag and OLE Db Datasource unto the designer.

4-table-to-text-file

Double-click it and enter sql to extract table records.
You may click preview to confirm desired resultset.

Drag a flat file destination object unto the designer.
Connect the OLE Db Datasource to the Flat File Destination object by dragging its green arrow to connect the two objects.

7-table-to-text-file

Create and configure the flat file connection manager to write a delimited list of employee records to a text file with column names appearing in the header row.

Execute the package and notice the number of records returned.

9-table-to-text-file

Locate the text file previously configured to view the results.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s