Page 1 of 1

Single row output from XML input stage!!

Posted: Wed Oct 13, 2010 7:18 am
by vimali balakrishnan
We have used XML input stage to read Xml file. Bofore XML input stage we have used external source stage to feed the XML input stage.

We have loaded the the XML input stage its meta data, and made a column as 'key' column since I got a warning that a key column should be specified for a repetition element.

Problem is that I am getting single row as output from the XML stage even though the xml file has multiple rows. All the required output feilds will become as single row in the output.

Please suggest if there is any solution for this issue.

Posted: Wed Oct 13, 2010 7:22 am
by chulett
Need more information. Each xml file will be read by the stage as 'one record' so that in and of itself is not an issue. What is your expected output here? Are you generating a sequential file? Can you be more specific about your output, please? Examples are always good. :wink:

Posted: Wed Oct 13, 2010 8:01 am
by vimali balakrishnan
Output of XML input stage is feeded to lookup stage and from this stage to table.
input consists of group of repeting section like this.

Code: Select all

<a>
<b>1</b>
<c>2</c>
</a>
<a>
<b>3</b>
<c>4</c>
</a>
And we want each repeating groups to be a row in the output, like
1 2
3 4

Posted: Wed Oct 13, 2010 8:26 am
by chulett
What XPath Expressions are you using?

Posted: Wed Oct 13, 2010 8:30 am
by vimali balakrishnan

Code: Select all

Tag b --> /a/b
Tag c --> /a/c
This is what we have put in the description of the output tab of XML input Stage.

Posted: Wed Oct 13, 2010 12:38 pm
by eostic
...you need to finish it....

/a/b/text()
/a/c/text()

...and make one of them a "key".

Ernie