Astera’s EDI Destination File object provides the functionality to validate the data against the receiver’s trading partner profile and write the data to an EDI destination file.
In this document, we will learn how to configure an EDI Destination File object in Astera.
To understand how to write to an EDI Destination File object, we will utilize a use-case where an XML source containing an X12 834 message has been serialized with the help of an EDI Message Serializer object. We now want to write this serialized output to an EDI destination file.
To perform this task, we will use the EDI Destination File object in Astera.
To access the EDI Destination File object, go to Toolbox > EDI > EDI Destination File and drag-and-drop the object onto the designer.
Let’s auto-map the metadata fields along with the Text field onto it.
Right-click on the EDI Destination File object’s header and select Properties from the context menu.
A configuration window will open, as shown below.
Provide the File Path. This is where the EDI destination file will be saved.
The configuration window also includes other document settings options. Let’s go over them:
Partner Profile – Fetches all outbound maps based on the partner profile provided.
Test Indicator – Allows user to specify any testing/debugging/validation indicator that may be used in the header or control segment of the message.
Contains Multiple Transaction Types – If selected, this indicates the message has multiple transaction types in a single message, with each message having its own Functional Group Header and Trailer. If not selected, the transactions will be grouped into a single chunk.
Omit Byte Order Mark – If selected, this indicates that the destination file must exclude the byte order mark from the beginning of the EDI message.
After configuring the document settings options, click Next.
The Config Parameters screen will open, where we can configure and define parameters for the Destination File and Trade Partner Profile file.
Use of Parameters eliminates the process of inserting hardcoded values and provides simplification in the deployment of flows. If the parameters are left empty, the default values defined in the Properties window are assigned for use.
Click Next, and a new window, General Options, will open. In this window:
Comments can be added.
General Options are given, which relate to processing of records in the destination file.
Click OK.
The EDI Destination File object is now configured, and the destination file can now be created by running the Dataflow.
The EDI Source File object allows users to ingest EDI (Electronic Data Interchange) files into Astera's Dataflow designer. The EDI Source File object in Astera supports all versions of the X12, EDIFACT and HL7 dialects. This documentation details how to configure the EDI Source File object, including specifying file paths, using partner profiles, and parsing transactions.
In this section, we will cover how to get an EDI Source File object on the Dataflow designer.
To get an EDI Source File object from the Toolbox, go to Toolbox > EDI > EDI Source File. If the Toolbox is not visible, go to View > Toolbox or press Ctrl + Alt + X.
Drag-and-drop the EDI Source File object onto the designer.
The dragged source object is empty right now. This is because it has not been configured yet. We will discuss the configuration properties for the EDI Source File object in the next section.
To configure the EDI Source File object, right-click on its header and select Properties from the context menu.
As soon as we select the Properties option from the context menu, a dialog box will open.
This is where we can configure our properties for the EDI Source File.
The first step is to provide the File Path for the EDI Source File. By providing the file path, we build connectivity to the source EDI file.
Next, we configure the EDI Document Settings. To do this, we can either use a Partner Profile file or manually configure which Dialect and Version we are using.
To use the Partner Profile file (.Tpp), we first check the Use Partner Profile option. Next, provide the File Path for the Partner Profile file.
Once this is configured, the EDI Source File object uses the dialect and version information from the Partner Profile file in order to parse the source file.
In the scenario where we do not have a Partner Profile file, we can also manually configure the Dialect and Version of the EDI Source File. To do this, we uncheck the Use Partner Profile option.
This then opens two dropdown options. By default, the EDI Source File object automatically detects the dialect and version of the file. However, this can be altered, if needed.
In case the dialect needs to be changed, the Dialect dropdown option is used to select the dialect of the EDI file. Astera currently supports the X12, EDIFACT and HL7 dialects.
In case the version needs to be changed, the Version dropdown allows us to choose the version of the selected dialect that applies to our EDI file. The version dictates the structure and interpretation rules for the EDI document.
Astera provides the option to both parse our EDI file within the source, or parse it separately using an EDI Message Parser object. If we do not check the Parse Transactions option, then we will need to attach the EDI Message Parser object in order to parse the source file.
If we want to parse our EDI File within the EDI Source File object, we will go to the Parsing Options and check the Parse Transactions option.
Once checked, we can configure some extra options in order to parse the EDI file.
Message – Indicate the specific message type of the EDI file. This is typically a code that specifies the kind of transaction contained in the file. An example is the 850 for purchase orders in the X12 dialect. By default, the message is automatically detected from the file and the Message option is set accordingly. However, if want to change the message type, it can be altered by selecting the required option from the dropdown menu.
Show Error Collection – Enable this option if you want the system to collect and display errors encountered while parsing the EDI file. It is a useful feature for debugging and ensuring the integrity of the data ingestion process.
Once the object has been configured, we will click Next. We will be taken to a new window, Config Parameters. Here, we can further configure and define parameters for the EDI Source File.
Parameters can provide easier deployment of flows by eliminating hardcoded values and provide an easier way of changing multiple configurations with a simple value change.
Once we have been through all the configuration options, we will click OK.
The EDI Source File object is now configured according to the changes made.
We can preview the data within the EDI Source File object by right clicking the header and selecting the Preview Output option.
This shows us the data preview for the EDI Source File object, allowing us to view the EDI source file’s data in hierarchical format.
This concludes using the EDI File Source object in Astera.
An EDI Message Serializer is used to build an EDI Message in the required EDI partner profile before the message is written to a destination. The serializer helps ensure that the message follows the required format specified by the partner.
In this document, we will learn how to use an EDI Message Serializer in Astera.
In this case, we will be building an EDI message using data available in an XML/JSON File Source.
This XML source represents the beginning segment of an X12 834 transaction set, providing information about a change in enrollment or benefits for an individual sponsored by a company.
We want to convert the hierarchical information, contained in multiple segments, into a single text stream.
To perform this task, we will use the EDI Message Serializer object in Astera.
To get the EDI Message Serializer object, go to Toolbox > EDI > EDI Message Serializer and drag-and-drop the object onto the designer.
Right-click on the EDI Message Serializer object’s header and select Properties from the context menu.
A configuration window will open, as shown below.
Let’s look at the properties on this window.
Partner Profile – Fetches all outbound maps based on the partner profile provided.
Version* – Allows users to specify the version they want to use to build their message.
Message* – Allows users to specify the type of message they want to send.
Show Error Collection – If selected, an error collection node will be added to the object, containing details of any errors in the message.
Pretty Print – If selected, when the output is previewed, it displays the text of the message in a more readable format for users.
Include Envelope – If selected, the object will include input and output nodes of metadata and control information for the message.
Test Indicator – Allows user to specify any testing/debugging/validation indicator that may be used in the header or control segment of the message.
* Options shown in this dropdown menu are limited to those defined in the partner profile.
Now, let’s configure the properties based on our use case.
Click Next. The Layout Modifications screen will open; here, users can choose to show, flatten, hide, sort, or add formulas to each node of the message.
Let’s keep the default layout and click Next. The Config Parameters screen will open; here, we can configure and define a parameter for the Trade Partner Profile file.
Use of Parameters eliminates the process of inserting hardcoded values and provides simplification in the deployment of flows. If the parameters are left empty, the default values defined at the Properties window are assigned for use.
Now, click OK, to proceed further.
Map the fields of the XML/JSON File Source object onto the EDI Message Serializer object’s fields.
Right-click on the object’s header and select Preview Output.
You can view the data through the Data Preview window.
Hover over the Text field and you will see the serialized EDI message.
To validate and store the serialized output, we must write it to an EDI Destination File.
Let’s drag-and-drop an EDI Destination File object from the Toolbox and auto-map the metadata fields along with the Text field onto it.
Let’s configure the Properties of the destination object and click OK.
The Dataflow is now ready. By running this Dataflow, you can now create an EDI destination file containing the serialized EDI message.
This is how an EDI Message Serializer object can be used to build an EDI message in Astera.
The EDI Message Parser object within Astera allows for the parsing of EDI message text from an EDI Source File object. This object is designed to interpret and convert the raw EDI message strings into a structured format that can be utilized within the Dataflow for further processing and mapping.
In this section, we will cover how to get an EDI Message Parser object onto the Dataflow designer.
To get an EDI Message Parser object from the Toolbox, go to Toolbox > EDI > EDI Message Parser object. If you are unable to see the Toolbox, go to View > Toolbox or press Ctrl + Alt + X.
Drag-and-drop the EDI Message Parser object onto the designer.
To use this object we will need a preconfigured EDI Source File object. The EDI Source File object provides us the unparsed EDI message in raw text format. The EDI Message Parser object then parses this text and creates nodes for each of the segments and elements. This provides us the ability to map the segments and elements further down the Dataflow.
Note: If the Parse Transactions option is checked in the EDI Source File object, then there is no need to use the EDI Message Parser as the EDI Source File object automatically parses the incoming EDI message.
To configure the EDI Message Parser object, right-click on its header and select Properties from the context menu.
As soon as we select the Properties option from the context menu, a dialog box will open.
This is where we can configure the properties for the EDI Message Parser object.
The first step is to provide the File Path for the EDI Partner Profile file (.Tpp).
Once this is configured, the EDI Message Parser object automatically uses the dialect and version information from the Partner Profile file in order to parse the source file.
The Version dropdown allows us to choose the version of the selected dialect that applies to our EDI file. The version dictates the structure and interpretation rules for the parsing of the EDI document. By default the version is picked based on the information from the EDI Partner Profile.
The Message option indicates the specific message type of the EDI file. This is typically a code that specifies the kind of transaction contained in the file. An example is the 834 Benefit Enrollment and Maintenance message within the 5010X220 version.
Next, we can enable the Show Error Collection option if we want the system to collect and display errors encountered while parsing the EDI file. It is a useful feature for debugging and ensuring the integrity of the data ingestion process.
HasErrors – True if the file contains errors, False otherwise.
Repository – Indicates which EDI repository is currently being used.
TransactionSetAcknowledgementCode – Shows the Transaction Set Acknowledgement Code of the EDI file
TransactionSetControlNumber –Shows Transaction Set Control Number of the EDI file.
TransactionSetIdentifierCode –Shows Transaction Set Identifier Code of the EDI file.
TransactionSetVersion –Shows the Transaction Set Version of the EDI file.
ActualCount – Shows the total amount of errors that have occurred.
ErrorDetail – Contains the details of the error that has been found in the EDI file.
LoopIdentifierCode –Shows the Loop Segment which contains the error.
PositionInFile – Shows the position where the error occurs within the Segment.
ErrorCode – Shows the Code number for the type of error contained in the EDI file.
In addition to this information, we are also shown error-specific information, which varies based on the type of error that has occurred. The error collection node is also visible in the Dataflow designer and may be mapped further for other usage.
Once we are done configuring the EDI Message Parser, we click Next and are directed to the Layout Modifications window.
Here, we click on the DTP Collection node and the Options for Collection panel appears.
Options for Collection:
Show – Shows collection node in the Tree Transform object.
Flatten With Item Count – Flattens data based on the record count in the collection node against each item in the parent node.
Flatten Based on Rules – Flattens a part of hierarchical data based on predefined rules.
Route Based on Rules – Routes and creates subsets of data based on predefined rules.
Merge With Item Count – Merges data based on the record count in the collection node against each item in the parent node.
Hide – Hides collection node from the Tree Transform object.
Calculation Formula – An expression box used for writing rules to route or flatten hierarchical data.
Sort Based On Keys – Sorts hierarchical data based on the field in the collection node. Only available for Show and Flatten With Item Count options.
If at any point throughout the layout modification process we want to see which nodes have been changed, we can check the Show Modified Nodes Only option. When this option is checked, the Layout Modifications window shows us only the nodes that were altered and hides the ones which were not.
In the Layout Modifications window we specify rules to flatten, route or merge our collection nodes for further use within the Dataflow, such as mapping them to other transformations and destinations.
To flatten our nodes, we choose the Flatten Based on Rules option. Once selected, a new section for adding rules will appear in the window.
To setup the rule, we configure the following options:
Description – This is the description provided to the rule for managing rules, organizing, naming, etc.
Active – If checked, the rule is active and therefore applied on the node. If unchecked, the rule is not applied on the node.
When the following condition holds – Enter the expression here based on which the node will be flattened.
In addition to working with the nodes, we can also apply calculations to the elements within the nodes.
Once we are done configuring the object, we will click Next. We are now taken to a new window, Config Parameters. Here, we can further configure and define parameters for the EDI Message Parser.
Parameters can provide easier deployment of flows by eliminating hardcoded values and provide an easier way of changing multiple configurations with a simple value change.
Click OK to conclude the configuration process for the EDI Message Parser object.
To use the EDI Message Parser object, we need to connect it to an EDI Source File object for file ingestion.
To preview data, right-click on the header of the EDI Message Parser object and select Preview Output from the context menu.
The Data Preview window will open. Upon expanding the EDI Message Parser, we will be able to see the parsed EDI file in hierarchical format.
We can now map this data to other transformations or destination files further down the Dataflow.
This concludes using the EDI Message Parser object in Astera.
If the EDI file contains an error, a red warning symbol is shown in the Data Preview window.
In the Data Preview, we can click the icon to expand the hierarchy and show the errors contained within this file. Here, we are provided information about the error and where it occurs. We commonly receive the following information for errors in the EDI file:
Here, there are two types of nodes. Single Instance nodes, represented with the icon and Collection nodes, represented with the icon. Clicking on these nodes will show us the Options for Collection, which allows us to modify the nodes and their structure.
Here we can add a new rule by clicking on the Add Switch Condition icon .