Concept of Key field in XML Stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
yatin.mittal
Participant
Posts: 20
Joined: Fri Oct 14, 2005 12:52 am

Concept of Key field in XML Stage

Post by yatin.mittal »

Hi,

My input data is having a Composite Primary key consisting of two elements.
I am unable to give two elements as key field in an XML stage.

Also, if I specify one element as key, some times it take duplicate records also and some times it ignores those records.

Can somebody guide me in this concept.

Thanks,
Yatin Mittal
Accenture Services Pvt. Ltd.
yatin.mittal
Participant
Posts: 20
Joined: Fri Oct 14, 2005 12:52 am

Re: Concept of Key field in XML Stage

Post by yatin.mittal »

Hi,

I have got the answer for my question.
Actually the key element to be specified in XML stage is for generating the output files on its basis. This will be the repetition element of the XML records.

If you designate the XPath expression /customers/customer/name/text() as the repetition element, XML Input generates only those output rows which have this element.
If there are only two occurrences of an element found along the path that includes the ancestor
elements /customers/customer/address, you can force a third row.


Thanks,

Yatin Mittal
yatin.mittal wrote:Hi,

My input data is having a Composite Primary key consisting of two elements.
I am unable to give two elements as key field in an XML stage.

Also, if I specify one element as key, some times it take duplicate records also and some times it ignores those records.

Can somebody guide me in this concept.

Thanks,
Yatin Mittal
Accenture Services Pvt. Ltd.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Concept of Key field in XML Stage

Post by chulett »

yatin.mittal wrote:Actually the key element to be specified in XML stage is for generating the output files on its basis. This will be the repetition element of the XML records.
Too late, but - yup, that is correct. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply