EDI Source

SQL Server 2005, 2008, 2008R2, 2012, 2014

SQL Server 2005, 2008, 2008R2, 2012, 2014

All Downloads ----- Join VIP ----- Questions?

Overview

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

COZYROC offers consulting services, in case you don't have the 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 or a later release before using it.


Demonstration

Setup

Use the parameters below to set up the EDI component.

Parameters

Configuration

Specify the EDI configuration file. More information is provided below about the configuration format.

IsInputFileVariable

Indicate whether or not the input file name is stored in a variable. This parameter has the options listed in the following table.

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

Select the input file name.

InputFileVariable

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

Related Topics: Integration Services Variables, Add Variable

SegmentDelimiter (1.4)

Override the segment delimiter loaded from the configuration file. This parameter 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 parameter 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 parameter 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 parameter is not visible in the setup dialog, but can be set in the data flow task properties pane.

ColumnLength (1.4 SR-1)

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

Configuration file

The EDI source component configuration is an 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 a user-friendly description of the configuration file.

Attributes

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


Element relationships

Relationship Element
Parent elements edimap
Child elements <none>
delimiters

This element contains the EDI file delimiters for the 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 parameters for controlling the EDI parser.

Attributes

Attribute Description
skipNewline (1.3 SR-4) Indicate that carriage return / line feed characters should be ignored. Starting from 1.4 SR-3 this option is replaced by the 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 a list of characters to be ignored.


Element relationships

Relationship Element
Parent elements edimap
Child elements <none>
segments

This element puts segments read from the EDI file into groups.

Attributes

Attribute Description
xmltag Name of the segments group.


Element relationships

Relationship Element
Parent elements edimap
Child elements segment
segment

This element specifies an 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 the mapping relationship to this segment. Starting from 1.3 SR-2, this attribute accepts a 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, and 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 may occur an unlimited number of times. If not specified, the default is 1.
segid (1.4 SR-3) Optional attribute which, if specified, will create an additional field for the segment's data flow output. The field will contain a unique segment identifier.


Element relationships

Relationship Element
Parent elements segments
Child elements field
field

This element specifies an EDI field. Each field is represented as a column in the SSIS data flow. You may 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 or sub-components which are not required.
required Specifies whether or not the field is required. By default it is set to false indicating the field is not required.


Element relationships

Relationship Element
Parent elements segment
Child elements component
component

This element specifies an EDI component. Each component is represented as a column in the SSIS data flow. You may 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 indicating the component is not required.


Element relationships

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

This element specifies an EDI subcomponent. Each subcomponent is represented as a column in the SSIS data flow. You may 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 indicating the subcomponent is not required.


Element relationships

Relationship Element
Parent elements component
Child elements <none>

How to exclude EDI elements you don't need from data flow? (1.5 SR-4)

To exclude an element from the data flow, prefix the xmltag attribute value with the IGNORE keyword like this:

<medi:field xmltag="IGNORE ISA01 I01 Authorization Information Qualifier" />

Related scripts

Case Study

Case study by EPIC Pharmacies, Inc.

Samples

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