nillable="true" not working in XML

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
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

nillable="true" not working in XML

Post by sarathchandrakt »

Hi,

I want to display all null value fields in XML. So what I did is, I modified my .xsd file and updated all fields with nillable="true" option. And my job design is like this,

External Source Stage->XML Stage

In XML Stage, I took Parsing Step and Composing Step. In both Steps, I updated the "document root" with the modified .xsd file. But still i am not able to see my null fields in output XML. Where do you think i am going wrong?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Perhaps this post will help. Or at least get you started on the right path.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

Post by sarathchandrakt »

Didn't help really!!! Thank you...
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Please be more explicit about what you are looking for. Usually with external source we are reading xml......and if that is what you are doing, exactly what do you want to see on your resulting relational columns.....

External source and composing is a bit odd.....please describe in detail.

Thanks.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

Post by sarathchandrakt »

Yes I am reading XML file. In the source XML file all NULL columns are hidden. To show the null columns in target XML, i updated the XSD with nillable="true" option for all columns and took it as document root in XML Composer in the XML stage. But still I can't see Null fields in target XML.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Sorry...not explicit enough. You say you are "reading" xml, and then later you mention "target XML".

Are you reading xml and writing to a sequential file or database?

Are you reading data from "somewhere" and then writing it into xml?

Are you trying to read xml and write xml in the same Stage?

All are do-able, but each has their complexities and requires more detail for understanding. ...and if you are just getting into xml, do only ONE of these --- don't try to combine the functions (read xml and write it at a single stage) until you fully have the independent functions working and doing what you expect them to.

...and what do you mean by "in the xml file all NULL columns are hidden" ? There is no such setting for "hiding" them. They are either "there", or they are "not there"...and if they are "there", they can be blank or empty, or they might have the "true" attribute setting for nullability.

Sorry --- we want to help, but we need a LOT more detail....especially necessary on the subject of nulls.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

Post by sarathchandrakt »

My Source and target are XML. In source Null values are not shown. In target I should show NULL columns too.
Post Reply