Sequential file at the output of xml 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
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Sequential file at the output of xml stage

Post by soumya5891 »

I have a job like the following.

1. Extracting data form a xml file using a sequential file staging where the whole xml data is being read into a single column.
2. Parsing the xml by using new xml stage in datastage 8.5(the DS version where I developed the job).
3. Write the parsing records into one dataset.

After parsingn the xml I'm getting two records in the dataset which is actual. But when I'm using sequential file stage instead of datastage in the target then only one recor is showing when checking the data by using View Data.

Is there any proper reason for this type of behaviour of the stages?
Soumya
MrBlack
Participant
Posts: 125
Joined: Wed Aug 08, 2012 8:57 am

Post by MrBlack »

I had a hard time following your setup. So the job looks something like this?

[Seq File] -> [XML Input] -> [Database]

And in the sequential file there's a column that is XML text. You use that column as the data source of the XML input?

And your question is, the XML string has two rows of data within the XML tags but when you do "View Data" in the sequential stage, you see just one row? Did I understand you correctly?
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Post by soumya5891 »

Yes, your understanding is absolutely fine, but have used the new xml stage which was introduced in 8.5.
Soumya
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Are you always seeing two rows leaving xml stage? If so, compare also to Peek, to be certain of what is going down those rows.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Post by soumya5891 »

When I'm using dataset I can see the two rows properly in the dataset when am doing view data. But same is showing one record when using sequential file stage. Now as per your suggestion I will place a peek and will see the recs in the log ,how it's coming
Soumya
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Also. Stop using "view data" when debugging this. Look at the sequential file using another editor. Your issue could simply be with view data. What are you getting in your sequential file.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
soumya5891
Participant
Posts: 152
Joined: Mon Mar 07, 2011 6:16 am

Post by soumya5891 »

I got the clarification. Did one basic mistake. One of the field value was becoming null after xml parsing that's why that records are getting dropped in the sequential file.

Thanks a lot Ernie for your help and support.I'm marking it as resolved.
Soumya
Post Reply