Using the Premium Flat File Destination Component
The Premium Flat File Destination Component is an SSIS data flow pipeline component that can be used to write data to a Flat File. There are three pages of configuration:
- Error Handling
The General page is used to specify general settings for the Premium Flat File Destination Component. The Columns page is used to manage columns from the upstream component. The Error Handling page allows you to specify how errors should be handled when they occur.
The General page allows you to specify general settings for the component.
- Connection Manager
The Premium Flat File Destination Component requires a connection. The Connection Manager drop-down will show a list of connection managers that are available:
Similar to the Source Component, the Connection Managers offered within this toolkit are the following:
- Local File
- FTPS Connection Manager
- SFTP Connection Manager
It is also important to note that this component also works with:
- OneDrive Connection Manager
- Dropbox Connection Manager
- SharePoint Connection Manager (offered with the SSIS Integration Toolkit for Microsoft SharePoint)
The Connection Manager option will show all the compatible connection managers that have been created in the current SSIS package or project.
- Destination File Path
The Destination File Path specifies the location of the file that you are trying to write to.
Specify the Locale of the file.
- Code Page
Specify the Code Page of the file.
- First Row Has Header
Select this option if you would like the first row to contain column names.
- Text Qualifier
Use the Text Qualifier option to specify the symbol that represents when the field begins and ends. This option is used in cases where the column may contain a character that represents the Column Delimiter.
- Column Delimiter
Specify a delimiter character to indicate the end of a column.
- Refresh Columns Button
Clicking the Refresh Columns button will bring up a prompt for you to confirm the refresh. After clicking "OK", It will remove any existing columns and add any columns it can find in the Destination File Path based on the Column Configuration values.
- Reset Columns Button
Clicking the Reset Columns button will bring up a prompt for you to confirm the reset. After clicking "OK", it will remove any existing columns and replace them with that of the Input Columns.
- Map Unmapped Fields Button
By clicking this button, the component will try to map any unmapped attributes by matching their names with the input columns from upstream components.
- Clear All Mappings Button
By clicking this button, the component will reset (clear) all your mappings in the destination component.
The Columns page of the Premium Flat File Destination Component allows you to map the columns from upstream components to the Premium Flat File Fields.
In the Columns page, you would see a grid that contains four columns as shown below.
- Input Column - You can select an input column from an upstream component for the corresponding Premium Flat File Field.
- Premium Flat File Field - The field that you are writing data to.
- Data Type - This column indicates the type of value for the current field.
- Unmap - This column can be used to unmap the field from the upstream input column, or otherwise it can be used to map the field to an upstream input column by matching its name if the field is not currently mapped.
- Misc - Properties window for the field listed. These values are configurable.
- DataType - The data type can be changed according.
- Length - If the data type specified is a string, the length specified here would be the maximum size. If the data type is not a string, the length will be ignored.
- Name - Specify the Column name.
- TextQualifier - You can set individual fields to determine if it has a text qualifier. The default is set to Auto. You may also choose yes or no.
- Import External Column - option to import the Columns and its properties from a file.
- Export External Column - option to save the Columns and its properties to a JSON file later for reuse.
- +sign - Add field to Flat File.
- - sign - Remove field from Flat File.
- Arrows - Move the fields to a desired location in the file.
Error Handling page
The Error Handling page allows you to specify how errors should be handled when they happen.
There are three options available.
- Fail on error
- Redirect rows to error output
- Ignore error
When the Redirect rows to error output option is selected, rows that failed to write to the Flat File will be redirected to the 'Error Output' output of the Destination Component. As indicated in the screenshot below, the blue output connection represent rows that were successfully written, and the red 'Error Output' connection represents rows that were erroneous. The 'ErrorMessage' output column found in the 'Error Output' may contain the error message that was reported by server or the component itself.
Using the Local File Connection Manager found in the Premium File Pack components
Within the Control Flow and Data Flow Components found in this toolkit, you will notice a 'Local File' connection manager in the Connection Manager area. Note that the Local File does not have to be configured in order for you to use this. You would simply select the 'Local File' option, and you would be able to access the folder and files within the local machine.