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.
SSIS Raw File Destination
Drag the Data Flow Task into the control flow region.
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.
Choose the Employee table from the list.
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.
Click the Browse button to create a new file to store the SQL Table data.
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.
Go to the Columns tab to choose the required columns.
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.
Run the SSIS Raw File Destination.
Let me show you the Raw file with the data.
We are changing the Write Option to Create. Once. And it shows an error message.
However, the error message was gone if I changed it 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.