tExtractEDIField
according to the EDIFACT family and the EDIFACT type, extracts data by parsing the generated
XML using the XPath queries manually defined or coming from the Repository wizard, and finally
sends the data to the next component via a Row connection.
tExtractEDIField Standard properties
These properties are used to configure tExtractEDIField running in the Standard Job framework.
The Standard
tExtractEDIField component belongs to the Processing family.
The component in this framework is available in all subscription-based Talend products.
Basic settings
Property type |
Either Built-in or Repository. |
 |
Built-in: No property data is |
 |
Repository: Select the repository |
Schema and Edit |
A schema is a row description, it defines the number of fields to Click Edit
|
 |
Built-in: You create the schema |
 |
Repository: The schema already |
EDI filename |
Filepath to the UN/EDIFACT message file to be processed. |
EDI version |
UN/EDIFACT version of the input file. |
EDI type |
UN/EDIFACT standard of the input file. |
Ignore new line |
Select this check box to skip carriage returns in the input |
Loop query |
Node of the structure tree on which the loop is based. |
Mapping |
Column: Reflects the schema as
XPath Query: Enter the fields to be
Get nodes: Select this check box to |
Die on error |
Select this check box to stop Job execution when an error is |
Advanced settings
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at a |
Global Variables
Global Variables |
ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
This component is usually linked to an output component to gather |
Â
Extracting data from an EDIFACT message
This scenario applies only to subscription-based Talend products.
This scenario describes a simple Job that reads the EDIFACT structure of an input
UN/EDIFACT Customs Cargo (CUSCAR) message file, and extracts data according to the
schema definition. The extract data is displayed on the Run console and sent to an XML file.
-
Drop the following components from the Palette onto the design workspace: tExtractEDIField, tLogrow, and
tFileOutputXML. -
Connect the components using Row >
Main connections. -
Double-click tExtractEDIField to display its
Basic settings view and define its
properties.
In this use case, the input schema is stored in the Metadata node of the Repository
tree view for easy retrieval. For further information concerning metadata, see
Talend Studio User Guide.
-
Select Repository from the Property Type list, and then click the three-dot
button next to the field that appears to open the Repository Content dialog box. -
In the Repository Content dialog box,
select the desired metadata item, cuscar in this use case,
and click OK. -
In the EDI parameters area, fill the
EDI filename field with the full path to
the input EDIFACT message file.In this use case, the input file is
99a_cuscar.edi. -
Select the Ignore new line check box to skip
the carriage return characters in the input file during data processing. -
As all the other parameters are automatically retrieved, simply leave them as
they are. -
Double-click the tFileOutputXML component to
show its the Basic settings view.
-
Fill the File Name field with the full path
to the output XML file you want to generate.In this use case, the output XML is
99a_cuscar_extract.xml. -
Leave the other parameters as they are.
-
Save your Job and press F6 to run it.
The defined data in the input EDIFACT CUSCAR message file is retrieved,
displayed on the console, and written into the output XML file.