Using the EDI Source Component
The EDI Source Component is an SSIS data flow pipeline component that can be used to read/retrieve data from an EDI file.
The component includes the following four pages to configure how you want to read data.
- General
- Design
- Outputs
- Columns
General Page
The General page of the EDI Source Component allows you to specify the general settings of the component.
- Connection Manager
-
The EDI Source Component requires a connection in order to connect to the EDI file. The Connection Manager drop-down will show a list of all connection managers that are available to your current SSIS package.
This component will support the following connection managers:
- Local File
- FTPS Connection Manager
- SFTP Connection Manager
- Amazon S3 Connection Manager
- Azure Blob Connection Manager
- Azure Data Lake Storage Connection Manager(since v10.0)
- Box Connection Manager
- Dropbox Connection Manager
- Hadoop Connection Manager(since v10.0)
- OneDrive Connection Manager
- SharePoint Connection Manager (offered with the SSIS Integration Toolkit for Microsoft SharePoint)
- Source File Path
-
The Source File Path specifies the location of the file that you are trying to read from.
- EDI Format
-
Specify the EDI Format of the file. The supported formats are:
- X12
- EDIFACT
- EANCOM
- VDA
- HIPPA
- HL7 (since v21.1)
- NCPDP Script (since v21.1)
- NCPDP Telco (since v21.1)
- Code Page
-
Specify the Code Page of the file.
- Flatten Segment Loops checkbox
-
If the FlattenSegment Loops checkbox is checked when the Refresh Columns button is clicked, the component will look at the input EDI file and determine which segment loops in the structure are empty, or have 1 entry. These segment loops will be changed to the 'Segment' type in the tree and will be output as columns of an existing output instead of creating a new output. Using this option can significantly reduce the number of outputs in the EDI Source.
- EDI Rule
-
The EDI rule field shows the EDI rule that has been auto-detected based on the source file.
- Import EDI Column Data button
-
If the Import EDI Column Data button is clicked, the following EDI Document Metadata Importer dialog will pop up.
- EDI Document Importer
-
The EDI Metadata Document Importer dialog is used to import the EDI design.
- Import From
-
You can choose to import the EDI Design from either the file available through the Connection Manager, or from local EDI file(s).
- EDI Format
-
This option allows you to choose the Format of the EDI File. Available formats are:
- X12
- EDIFACT
- EANCOM
- VDA
- HIPPA
- HL7 (since v21.1)
- NCPDP Script (since v21.1)
- NCPDP Telco (since v21.1)
- Source File Path
-
This option can be used in order to specify the file path to import the EDI Document Design from. When Local File is selected as the Import From option, multiple files can be selected to import.
- Code Page
-
Specify the Code Page of the file.
- Flatten Segment Loops
-
If the Flatten Segment Loops checkbox is checked the component will look at the EDI file and determine which segment loops in the structure are empty, or have 1 entry. These segment loops will be changed to the 'Segment' type in the tree. Using this option can significantly reduce the number of inputs in the EDI Destination. When multiple local files are imported into EDI Document Metadata Designer, a combined EDI design will be generated.
- Update EDI Rule
-
- If the Update EDI Rule checkbox is checked the component will read part of the file to determine which EDI rule to use. If that rule has been downloaded the import will proceed and if not an error will be shown that will specify which rule to download. The detected EDI rule will be set in the EDI rule field.
- If the Update EDI Rule checkbox is unchecked the component will try to use the rule that is specified in the EDI Rule field to import the EDI document; the component will not read the EDI document to try and determine the correct rule.
- Expression fx Icon
-
Click the blue fx icon to launch SSIS Expression Editor to enable dynamic updates of the property at run time.
- Generate Documentation Icon
-
Click the Generate Documentation icon to generate a Word document that describes the component's metadata including relevant mapping, and so on.
- EDI Rules Manager button
-
The EDI Rules Manager button is available on every page of the source editor. Clicking it will launch the EDI Rules Manager dialog.
Because of the quantity and size of EDI Rules, the component is not shipped with the rules for every EDI format and version. The EDI Rules Manager makes it easy to download additional EDI Rules.
When the EDI Rules Manager dialog is opened it features a grid of all supported EDI rules with the following columns:
- Rule Name
-
The name of the EDI rule.
- Rule Relative Path
-
The relative path to the EDI rule.
- Local Rule Path
-
The local path where the EDI rule is stored.
- Status
-
The status of the rule. The status will be 'Available' for rules that have already been downloaded, or a 'Download' button for rules that have not been downloaded. Clicking the 'Download' button will download the rule.
- Hide Available Rules checkbox
-
This checkbox will hide any EDI rules from the grid with the 'Available' status.
- Hide Downloadable Rules checkbox
-
This checkbox will hide any EDI rules from the grid with the 'Download' status.
- Find Rule
-
Entering text in the find rule text box will filter the list based on EDI rules that contain the text that was entered.
Design Page
The Design page of the EDI Source Component displays a tree that represents the structure of the EDI document that the component will read from.
- Design Tree data grid
-
The design tree data visualizes the structure of the EDI document. It has three columns: Name, Output/Column Name and Type.
- Name column
-
The name column displays the name of the EDI element that the row describes. This column is read-only.
- Output/Column Name column
-
The Output/Column Name column displays the name of the output or output column corresponding to the EDI element from the name column. This value can be edited.
- Type column
-
The type column displays the type of the EDI element, either Segment, Segment Loop or Data Element.
- Segments are elements that contain child elements of any type.
- Segment Loops are repeating segments, a segment loop will be mapped to a new output.
- Data Elements are elements that are primitive values and can be mapped to an output column.
The Type column is editable. EDI elements that are detected as segment loops can be changed to segments which will cause them to not be mapped to a new output, and instead be mapped to an existing output (the segment loop's parent output). If the segment loop is changed to segment and has multiple rows of data only the first row of data will be used.
Outputs Page
The Outputs page allows outputs to be configured.
The Outputs page grid consists of the following columns:
- Enabled: The checkbox column determines if this output will be enabled.
- Output Name: The name of the output.
- Key Field: The key field that will be used as the parent field in any children that this output has.
- Path: The path to the EDI element that this output corresponds to.
Columns
The Columns page allows output columns to be enabled or disabled and their properties changed.
The page contains a combobox that allows an output to be selected, and its columns displayed in the grid. The grid consists of the following columns:
- Enabled: The checkbox column determines if this output will be enabled.
- Column Name: The name of the column.
- Date Type: The data type of the column.
-
Misc: Properties window for the field listed. These values are configurable.
- Column Type: Description of the selected column.
- Name: Specify the Column name.
- CodePage: Specify the Code Page of the field.
- Data Type: Specify the Date Type of the field.
- 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.
- Precision: Specify the number of digits in a number.
- Scale: Specify the number of digits to the right of the decimal point in a number.
Note: As a general best practice, you should only select the fields that are needed for the downstream pipeline components.
Error Handling
The Error Handling Page page allows you to specify how errors should be handled when they happen.
There are three options available:
- Fail on Error
- Log Segment/Loop Errors and attempt to continue Execution
- Ignore Segment/Loop Errors
Using the Local File Connection Manager found in the EDI Source component
Within this component, you will notice a 'Local File' connection manager in the Connection Manager area. Note: 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.