Hierarchial Data

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
devsonali
Premium Member
Premium Member
Posts: 155
Joined: Sun Mar 18, 2007 2:31 pm

Hierarchial Data

Post by devsonali »

Hello all,

I am currently using "Hierarchical Data" stage in order to split the xml files into multiple files based on Batch Split Key.

In order to create XML's I need to default certain fields in addition to get data from input (database) and few calculation fields (in transformer)

Issue :
There are two issues

The output files needs a few tags (no data within it ) and a few values to be mapped from the input (transformer)

However , when I do the mapping I am unable to select (and map)input fields in the output fields that has max and min occurrence of only once. I am only able to select a constant value of a parameter

When I try to select the error message says
CDIUI2820E The mapping is not applicable due to an invalid type conversion or difference in the source and target list dimensions.

Secondly for output fields which are only needed as tags if I pass a constant value as '' (empty string) the output is displayed with '' as value , so I had do do a workaround to pass an empty column from a transformer , however - again I can do this to only few columns which are defined as unbounded in XSD .

With this I do not have much to experiment , Is there a way to select columns from input fields for columns which can occur only once per XML ?

Database -transformer - "Hierarchical Data"
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Dealing with the "list" rules can be tricky...but look at the Aggregator Step...it might help you here, by choosing the scope of the list you are working with (likely your input link list) and then choosing "first", since you are dealing with a constant (or so it sounds like).

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
wpkalsow
Premium Member
Premium Member
Posts: 11
Joined: Wed Mar 12, 2003 6:13 pm
Contact:

Re: Hierarchial Data

Post by wpkalsow »

I would recommend getting all of the data columns assembled before the Hierarchical stage.

In the Hierarchical stage Assembly Editor try a Regroup step to cause the incoming rows to be broken into desired XML elements in a following Composer step.
Post Reply