Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there any online example which explains how to configure a tExtractXMLField component?
I am using Talend v6.1 and I have a peculiar problem with this component. I am having a database table (MS SQL) which has a column/field that contains some XML data.
The data is in the following format:
<Attributes>
<Attribute>
<DisplayOrder>1</DisplayOrder>
<Name></Name>
<Alias>SSI</Alias>
<Length>20</Length>
<DefaultValue>2</DefaultValue>
</Attribute>
<Attribute>
<DisplayOrder>2</DisplayOrder>
<Name>PII</Name>
<Alias>PII</Alias>
<Length>20</Length>
<DefaultValue>1979</DefaultValue>
</Attribute>
</Attributes>
In the ETL job I am reading this data using a tMSSqlInput component and linking it to a tExtractXMLField component via Main.
Then I am trying to read the XML fields individually and display the contents of each field using a tLogRow component. My ultimate aim is to insert this read data into another MS SQL database table.
The job design is as follows
As you can see one row is read from the database but 0 rows are passed from the XML component.
The schema of the tMSSqlInput component has the name of the single field that is selected in the query as shown below
This same field is mapped against the "XML field" field of the tExtractXMLField component.
The output schema of tExtractXMLField is defined as follows:
And the "Loop XPath query" is given as "\Attributes\Attribute" and each of the field that needs to be extracted is given as "<FieldName>" against their respective fields defined in the output schema of the tExtractXMLField.
Can anyone tell me what is the issue with this job?