EDI Source

Overview

EDI Source Component is SSIS Data Flow Component for parsing EDI format files. The configuration options are provided in the standard data flow source component dialog. The component has already been successfully used to process 210, 810, 812, 820, 822, 832, 834, 835, 850, 852, 855, D95B formats.

CozyRoc offers consulting services, in case you don't have resources internally to build the configuration file. For details contact us.

Note: In SSIS+ 1.3 SR-2, the EDI Source component has been considerably enhanced. We recommend that you install SSIS+ 1.3 SR-2 before using it.

Demonstration

Setup

Use the options below to setup the EDI component.

Options

Configuration

Specify EDI configuration file. Check below for more information about the configuration format.

IsInputFileVariable

Indicates whether the input file name is stored in a variable. This property has the options listed in the following table.

Value Description
True The input file name is stored in a variable. Selecting the value displays the dynamic option InputFileVariable.
False The input file name is specified. Selecting the value displays the dynamic option InputFile.
InputFile

Select input file name.

InputFileVariable

Select an existing user-defined variable, or click <New variable...> to create a variable.

Related Topics: Integration Services Variables, Add Variable

SegmentDelimiter (1.4)

Override the segment delimiter loaded from the configuration file. This property is not visible in the setup dialog, but can be set in the data flow task properties pane.

FieldDelimiter (1.4)

Override the field delimiter loaded from the configuration file. This property is not visible in the setup dialog, but can be set in the data flow task properties pane.

ComponentDelimiter ((1.4)

Override the component delimiter loaded from the configuration file. This property is not visible in the setup dialog, but can be set in the data flow task properties pane.

SubcomponentDelimiter (1.4)

Override the sub-component delimiter loaded from the configuration file. This property is not visible in the setup dialog, but can be set in the data flow task properties pane.

ColumnLength (1.4 SR-1)

Specify column length for EDI elements. The default is 250.

Configuration file

The EDI source component configuration is XML file based on the Milyn configuration schema. The latest schema is available here. These are the configuration elements:

edimap

This is the top level root element of the XML document.

Element relationships

Relationship Element
Parent elements <none>
Child elements description, delimiters, segments
description

This element contains user-friendly description of the configuration file.

Attributes

Attribute Description
name Description of configuration file.
version Version of configuration file.

Element relationships

Relationship Element
Parent elements edimap
Child elements <none>
delimiters

This element contains the EDI file delimiters for segment, field, component and sub-component parts. Special characters like line feed character are specified using XML Character References.

Attributes

Attribute Description
segment Segments delimiter character.
field Fields delimiter character.
component Components delimiter character.
sub-component Sub-components delimiter character.

Element relationships

Relationship Element
Parent elements edimap
Child elements <none>
options (1.3 SR-4)

This element contains parameter for controlling the EDI parser.

Attributes

Attribute Description
skipNewline (1.3 SR-4) Specify to ignore carriage return / line feed characters. Starting from 1.4 SR-3 this option is replaced by skipCharacters option below. To get the equivalent of specifying this option to true, set skipCharacters to "&#13;&#10;"
undefinedFail (1.4 SR-2) Specify how to handle the appearance of new field, component and sub-component elements. If set to false the parser will ignore the new elements.
skipCharacters (1.4 SR-3) Specify to ignore a list of characters.

Element relationships

Relationship Element
Parent elements edimap
Child elements <none>
segments

This element groups segments read from the EDI file.

Attributes

Attribute Description
xmltag Name of the segments group.

Element relationships

Relationship Element
Parent elements edimap
Child elements segment
segment

This element specifies EDI segment. The segment is represented as a separate Output in the SSIS data flow, if it repeats. If the segment repeats once, the segment elements are included as part of the parent segment to serve as context for other segments. You can specify multiple segments.

Attributes

Attribute Description
segcode Code found in the EDI file, which establishes mapping relationship to this segment. Starting from 1.3 SR-2, this attribute accepts regular expression for matching complex segments.
xmltag Name of the segment.
truncatable When set to true, the parser will not generate errors when the segment does not contain trailing fields, components, sub-components, which are not required.
minOccurs Minimum amount of times this segment occurs. If not specified the default is 1.
maxOccurs Maximum amount of times this segment occurs. Specify -1 if this segment occurs unlimited number of times. If not specified the default is 1.
segid (1.4 SR-3) Optional attribute, which if specified will create additional field for the segment's data flow output. The field will contain unique segment identifier.

Element relationships

Relationship Element
Parent elements segments
Child elements field
field

This element specifies EDI field. Each field is represented as column in the SSIS data flow. You can specify multiple fields.

Attributes

Attribute Description
xmltag Name of the field.
truncatable When set to true, the parser will not generate errors when the field does not contain trailing components, sub-components, which are not required.
required Specifies whether the field is required. By default it is set to false.

Element relationships

Relationship Element
Parent elements segment
Child elements component
component

This element specifies EDI component. Each component is represented as column in the SSIS data flow. You can specify multiple components.

Attributes

Attribute Description
xmltag Name of the component.
truncatable When set to true, the parser will not generate errors when the component does not contain trailing sub-components, which are not required.
required Specifies whether the component is required. By default it is set to false.

Element relationships

Relationship Element
Parent elements field
Child elements sub-component
sub-component

This element specifies EDI subcomponent. Each subcomponent is represented as column in the SSIS data flow. You can specify multiple subcomponents.

Attributes

Attribute Description
xmltag Name of the subcomponent.
required Specifies whether the subcomponent is required. By default it is set to false.

Element relationships

Relationship Element
Parent elements component
Child elements <none>

Samples

  • The sample package used in the demonstration video can be download from here.