Problems with XML Structure

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

Post by chulett »

Next time rather than "dots" just use the code tags, they preserve whitespace. Can you show us the XPath Expressions you are using? I'd also be curious what stage you are using, the new XML Assembly I believe it is called?
-craig

"You can never have too many knives" -- Logan Nine Fingers
joycerecacho
Participant
Posts: 298
Joined: Tue Aug 26, 2008 12:17 pm

Post by joycerecacho »

Hello Craig!
Actually I am using the XMLOutputPX stage, and the 'trigger' resource to split the file after a certain quantity of registers.

I used the "XML stage" once - the new one - to read a XML File, and I think it was very complex. It worked after a big help from an IBM guy who is not here anymore.

I never tried to generate a file by this new one.
I think I need some help.
Joyce A. Recacho
São Paulo/SP
Brazil
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I wasn't suggesting you use the new one, simply asking if it was the one you were using since you are running the 11.x version. And you're right, it does add a level of complexity to the process. It shouldn't be a problem to stick with the XMLOutput stage. Can you post the XPath Expressions you are using and the settings you've set in the stage?
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Wish I could help, just trying to make sure there's enough information here when someone with more XML smarts wanders by so they can help properly. Thankfully, it's been far too long since I had to worry about stuff like this. :wink:

One clarification - when you say "key columns" as in plural, does that mean you've marked more than one? If so, cut it back to a single key column and see if that helps at all.
-craig

"You can never have too many knives" -- Logan Nine Fingers
joycerecacho
Participant
Posts: 298
Joined: Tue Aug 26, 2008 12:17 pm

Post by joycerecacho »

:)
Hopefully a smart person in xml will help me with this.
Thanks anyway Craig.
About the keys, yes! I use these two.
If I cut them or one of them, or change by another one, it duplicates the tags.
It must be exactly like this.
(at the current version, without the Avs tags).

I tried to add the tag <Avs> but it didnt work.
:(
I dont know...

I'll try to configure the new xml stage.
Does it have the option to split the file?
I didnt find this trigger option.

Thank you so much!!
Joyce A. Recacho
São Paulo/SP
Brazil
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Unless something has changed, only one "key" column was supported. [shrug] And the new Assembly doesn't support splitting directly from what I've read here but there is a 'trick' you can do with End Of Wave markers or some such to do the same thing. I'll see if I can find the post where Ernie explained it...

Aha! Found it here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The issue is not about keys per se.....it's about having two entirely independent paths. .....each of which repeats on its own.

Using the old stage, you need to buikd one child path, such as the non avs.....and then save that to a table as a single chunk......then look it up as a value on the rows when you build the avs path farther downstream, and include the formerly built non avs path. This is outlined in the xml best praxlctices document that you will find mentionwd in numerous locations here in the forums.

Using the new stage it can be done in the same assembly, but requures that you learn how to build the paths in a variety of steps, often using one of the join steps to bring the independent paths together.

In either case, you are dealing with independent repeating groups that are not unlike relational tables with a common parent.

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 »

I didn't think it was about the keys, necessarily, was curious if marking multiples would cause an issue. In the old days I recall the job failing if you'd done that, is it allowed now and actually works? Or does it pick one of the multiples to use?
-craig

"You can never have too many knives" -- Logan Nine Fingers
joycerecacho
Participant
Posts: 298
Joined: Tue Aug 26, 2008 12:17 pm

Post by joycerecacho »

chulett wrote:I didn't think it was about the keys, necessarily, was curious if marking multiples would cause an issue. In the old days I recall the job failing if you'd done that, is it allowed now and actually works? Or does it pick one of the multiples to use?
It perfectly works!
And it must be these two keys, otherwise the result is not ok.
:wink:
(at the current version, without Avs Tags)
Joyce A. Recacho
São Paulo/SP
Brazil
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

The keys for output links help establish the aggregatiion needed to build a single path hierarchy. I wouldn't necessarily trust the multiple keys.....ultimately it is really just establishing a lowest level repetition element......so test it carefully.

Either way, the key indicators have no impact on building independent paths....

Ernie
Ernie Ostic

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