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
tiozzo
Charter Member
Posts: 38 Joined: Fri Sep 01, 2006 3:07 pm
Post
by tiozzo » Mon Sep 17, 2007 11:19 am
Want to create dynamic tags in a xml:
following is the table to pickup the data:
Keytag Maintag Subtag Value
-------- --------- ------ -----
PC A X 1
PC B X 4
KB B X 6
HD A X 2
HD B X 7
Desired Result (xml):
--------------------------
<PC><A><X>1</X></A><B><X>4</X></B></PC>
<KB><B><X>6</X></B></KB>
<HD><A><X>2</X></A><B><X>7</X></B></HD>
VCInDSX
Premium Member
Posts: 223 Joined: Fri Apr 13, 2007 10:02 am
Location: US
Post
by VCInDSX » Mon Sep 17, 2007 11:28 am
Check out Duke's link
http://www.duke-consulting.com/Download ... ctices.zip for a best practices document which has use cases for many XML scenarios. You should be able to achieve it with the help of this document.
Do you have an XSD for your output XML?
Good luck,
-V
tiozzo
Charter Member
Posts: 38 Joined: Fri Sep 01, 2006 3:07 pm
Post
by tiozzo » Mon Sep 17, 2007 3:10 pm
I dont have XSD for my output xml file.
I am getting following error when trying to assign "XML" as data Element to my xml chunk. So that i can join it with main xml. Do i need to create XSD for xml ?
"the data element selected is not compatible with sql data type."
eostic
Premium Member
Posts: 3838 Joined: Mon Oct 17, 2005 9:34 am
Post
by eostic » Mon Sep 17, 2007 5:12 pm
That's an error I haven't seen before in relation to XMLOutput..... Can we assume that your SQL data type is char/varchar/longvarchar ?
Ernie
tiozzo
Charter Member
Posts: 38 Joined: Fri Sep 01, 2006 3:07 pm
Post
by tiozzo » Tue Sep 18, 2007 7:49 am
eostic wrote: That's an error I haven't seen before in relation to XMLOutput..... Can we assume that your SQL data type is char/varchar/longvarchar ?
Ernie
Im using VARBINARY data type and XML as data element for the xml chunk data.
eostic
Premium Member
Posts: 3838 Joined: Mon Oct 17, 2005 9:34 am
Post
by eostic » Tue Sep 18, 2007 8:36 pm
What's in your XML content that you need varbinary? I'm not surprised that it is upset. It's probably expecting pure text....