XML property clarification

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
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

XML property clarification

Post by vamsi.4a6 »

I am using XML input stage first time.Not sure about these properties.Any body input is really appreciated

1)What is meant by Repetition element required present in Transformation setting of stage tab?
2)What is meant by Repetition element required present in Transformation setting of output tab?
3)What is difference between these two?
4)I am working on XML file and how to decide whether it has namespace declaration or not?


I am posting these question after going through manual.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Have you ever worked with XML before? I don't mean in DataStage, I mean at any point. Just trying to judge your familiarity with XML... guessing it is new to you.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

@Chullet.
NO.I am new to XML and i posted the question after going through Manual
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

That' great, and welcome to the world of xml ---- but start first with serarches thru the forum here on these definitions and generally in google ---- you will find hundreds of posts here and in general that wwill answer the basics. Then let us know if/where you get stuck.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Let's keep your questions in your posts rather than jumping on the end of old ones. Moved this one here:
vamsi.4a6 wrote:Could anybody please elaborate on How to find the 'lowest' element as the Repetition element?
Lowest as in 'deepest'... as in the number of levels down the hierarchy. More of an art than a science, I was a big fan of "pick one and see if it works" back when I had to deal with XML on a daily basis.

Ernie may have a more cogent answer, being our resident XML Wizard. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Perhaps the XPath expression with the greatest number of delimiters?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The repetition element (the one you mark as a "key") is simply an indicator that this is the deepest level that "I care about for retrieval"....usually it is "the bottom" of a particular nested path...but it doesn't have to be.

It has NOTHING to do with the word "key" ...that is merely an indicator that this is the repeating group that you want to use to define each repeating "row".

Pick an element that you know will exist all the time, if possible.

You ALWAYS need to select ONE repeating element for each output link or the Job will abort at run time.

Then.....if you have "repetition element required" checked elsewhere in the Stage, it says that the element must exist for you to receive a row for that repeating node. If it is not required, then you can retrieve the parent and null for the repeating element node. If required and it doesn't exist, then you lose the parent value also. To understand this, think about an xml document with many departments for a company and employees under the department. If you have a department that has no employees, then THAT department won't be retrieved if the repeating element is required and at the employee level.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Thanks Ernie. 8)
-craig

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