Single row output from XML input stage!!

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vimali balakrishnan
Participant
Posts: 60
Joined: Mon Dec 27, 2004 3:38 am

Single row output from XML input stage!!

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
vimali balakrishnan
Participant
Posts: 60
Joined: Mon Dec 27, 2004 3:38 am

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What XPath Expressions are you using?
-craig

"You can never have too many knives" -- Logan Nine Fingers
vimali balakrishnan
Participant
Posts: 60
Joined: Mon Dec 27, 2004 3:38 am

Post 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.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

...you need to finish it....

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

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

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply