is it possible to omit null columns while creating xml from csv file in Datastge8.1 parallel extender? In the sequential file stage ,I can not specify quote and delimiter as 000 as mentioned in this blog.
< split from this post>
Omit null columns in XML output
Moderators: chulett, rschirm, roy
You should start your own thread, but the equivalent settings in a parallel Job are delimiter NONE and quote character NONE.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Omit null columns in xml outDatastage 8.1 paralllel extender
Hi Ernie,
is it possible to omit null columns while generating xml file in datastage 8.1 parallel edition.I see from this post that it is possible in server.Can you please tell how it can be done in parallel job.In sequential file stage of parallel edition ,i can not specify delimiter and quote as 000
is it possible to omit null columns while generating xml file in datastage 8.1 parallel edition.I see from this post that it is possible in server.Can you please tell how it can be done in parallel job.In sequential file stage of parallel edition ,i can not specify delimiter and quote as 000
Maybe someone can split this into its own thread.
These are two different questions. First, the xmlOutput Stage, by default, will not create elements for columns whose condition is truly "null". The elements simply won't be there for that row. If you have name and phone within person for a given row, and they are all present, with values, you'll get:
but if phone is null for a given row, you'll just get:
The 000 or NONE settings for Server and EE Sequential Stages is simply to write out a file that has no delimiters and no quote characters. Use it when you are sending a single large column of xml content into a Sequential Stage. Often it is useful to send the output of an xml stage (or xmlOutput) to some other stage for further processing. In fact, I recommend that you ONLY process xml this way. If you do, you code doesn't change whether you are writing the xml to sequential file, MQ series, Oracle, DB2, or whatever. Put one big column on the output link of the stage and give it a longvarchar and long length and in xmlOutput Stage, put a single '/' in the Description property. In the xml stage, map the final output from the Composer to your column in the Output Step.
Ernie
These are two different questions. First, the xmlOutput Stage, by default, will not create elements for columns whose condition is truly "null". The elements simply won't be there for that row. If you have name and phone within person for a given row, and they are all present, with values, you'll get:
Code: Select all
<person>
<name>fred</name>
<phone>234</phone>
</person>
Code: Select all
<person>
<name>fred</name>
</person>
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Thank you Craig! Bless all you admins...!
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>