Hi,
I am having foollowing problem while generating output as XML file.
Please anybody can help me out on this.
It is from Teradata->Xfmer-> Hash->Xfermer-> XML OUT
I have following 12 columns in my hash file
BAN
DUNS
BANBillCycle
Contactfirstname
stprvCd
cityNm
addressnm
cntctfirstname
cntcsbusnm
Technicalcontact
technicalphonenumber
BillingParent
The output should be divided in following way
First three columns should ne under /BAN
Second Hierarchi should be under /BillingContactDetails with next 4 columns
third Hierarchi should be under / BillingContactAddress with next 2 columns
Fourth shoold be under /technicalcontactdetails with next 2 columns
and Final with last column as /Billingparent
if I give first three column as
/Ban
/ban/duns
/ban/billcycle
then
/BillingContactDetails/Contactfirstname
/BillingContactDetails/stprvCd
/BillingContactDetails/cityNm
/BillingContactDetails/addressnm
then same way other header like
/billingcontactdetails
then
/Technicalcontactdetails
and final one
But in output I get only first three columns only.
Others I want to add header or Hirarchi as mentioned.
XML SChema help
Moderators: chulett, rschirm, roy
XML SChema help
Last edited by swades on Thu Mar 15, 2007 8:38 pm, edited 1 time in total.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Policy Note
We don't do "urgent" or "ASAP" here. All posters are unpaid volunteers. If you want urgent help sign up with your support provider for premium service, and learn the true cost of "urgent".
We don't do "urgent" or "ASAP" here. All posters are unpaid volunteers. If you want urgent help sign up with your support provider for premium service, and learn the true cost of "urgent".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ok, now that that is out of the way...
Do you (ideally) have an xsd for or at the very least a sample of this target file you are trying to create? You would then use that to import the XML metadata and that process would build the XPath Expressions for you automagically. I find those generally work better than any you cobble together yourself.
Do you (ideally) have an xsd for or at the very least a sample of this target file you are trying to create? You would then use that to import the XML metadata and that process would build the XPath Expressions for you automagically. I find those generally work better than any you cobble together yourself.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Craig is right --- an xsd or existing XML document is going to make this far simpler....but for starters, be sure you have a full root structure that wraps all of these element "nodes".....
...so, I don't know what your "header" looks like, but you should be ok if you start a pattern like below:
Here is your original...
/ban/duns
/ban/billcycle
then
/BillingContactDetails/Contactfirstname
/BillingContactDetails/stprvCd
/BillingContactDetails/cityNm
/BillingContactDetails/addressnm
then same way other header like
/billingcontactdetails
then
/Technicalcontactdetails
at the very least, it should look like:
/mybase/ban/duns/text()
/mybase/ban/billcycle/text()
then
/mybase/BillingContactDetails/Contactfirstname/text()
/mybase/BillingContactDetails/stprvCd/text()
/mybase/BillingContactDetails/cityNm/text()
/mybase/BillingContactDetails/addressnm/text()
/mybase/billingcontactdetails/text()
/mybase/Technicalcontactdetails/text()
...we don't know exactly what the details are that you need, but at a minimum you want to have a root element and then a higher sub node of that that "contains" each of your individual column groups. Assuming these columns all came from a single row of a hash table or other relational structure you'll be fine. You'll get into difficulty if the various groups you describe are individually repeating.....
Ernie
...so, I don't know what your "header" looks like, but you should be ok if you start a pattern like below:
Here is your original...
/ban/duns
/ban/billcycle
then
/BillingContactDetails/Contactfirstname
/BillingContactDetails/stprvCd
/BillingContactDetails/cityNm
/BillingContactDetails/addressnm
then same way other header like
/billingcontactdetails
then
/Technicalcontactdetails
at the very least, it should look like:
/mybase/ban/duns/text()
/mybase/ban/billcycle/text()
then
/mybase/BillingContactDetails/Contactfirstname/text()
/mybase/BillingContactDetails/stprvCd/text()
/mybase/BillingContactDetails/cityNm/text()
/mybase/BillingContactDetails/addressnm/text()
/mybase/billingcontactdetails/text()
/mybase/Technicalcontactdetails/text()
...we don't know exactly what the details are that you need, but at a minimum you want to have a root element and then a higher sub node of that that "contains" each of your individual column groups. Assuming these columns all came from a single row of a hash table or other relational structure you'll be fine. You'll get into difficulty if the various groups you describe are individually repeating.....
Ernie