SSIS Raw File Destination

This SSIS Integration Services article shows how to configure the Raw File Destination to export or load data from various data sources to Raw File.

The below screenshot displays the records in the Employee table.

Employee Table

SSIS Raw File Destination

Drag the Data Flow Task into the control flow region.

Add Data Flow Task to Package

Double-click to open the SSIS Data Flow Region. Then, drag the OLE DB Source and double-click on it to open the Editor. Next, click the New button to configure the OLE DB Connection Manager. For more Data Loading options >> Click Here.

Here, we have chosen the existing one, but you can create a new connection by clicking the New button.

Connect to Database Tables

Choose the Employee table from the list.

Choose Employee Table from Database

Drag the SSIS Raw File Destination and connect the OLE DB source to it. Next, Double-click on the Raw File Destination to open the Editor.

SSIS Raw File Destination Write Option:

  • Create Always: It always creates a new file.
  • Create Once: It makes only once.
  • Append: Appends table data to the existing file. 
  • Truncate and Append: Delete existing data from the chosen file and Append table data to it. 
SSIS RAW File Destination 1

Click the Browse button to create a new file to store the SQL Table data.

SSIS RAW File Destination 2

Go to the Columns tab to choose the required columns.

SSIS RAW File Destination Columns Tab

Next, Click on the Generate Initial Raw file button to generate a file with the selected columns. Then, Click OK to close the editor window.

Click on the Generate Initial Raw file button

Run the SSIS Raw File Destination.

Run the SSIS Raw File Destination

Let me show you the Raw file with the data.

Output

We are changing the Write Option to Create. Once. And it shows an error message.

Set SSIS Raw File Destination Write Option to Create Once

However, the error message was gone if I changed it to Truncate and Append.

Set SSIS Raw File Destination Write Option to Truncate And Append

If you run this package, it will remove all the data from the chosen file and freshly append these records to it.