XML Table definition

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
HanuKoya
Premium Member
Premium Member
Posts: 23
Joined: Tue Oct 10, 2006 8:04 am

XML Table definition

Post by HanuKoya »

Hi all,
I have a XML File. I need to import Table definition using that file. I'm giving the file here. Please give me which is the delimiter for this file?.
When I try to put Delimiter as / it is not taking.

SAMPLE FILE:
----------------

<ProductReferenceID>1201667</ProductReferenceID>
<ReturnedQty>-1</ReturnedQty>
<AmountCredited>29.99</AmountCredited>
<ReturnDateTimeStamp>2007-11-25-13.22.00</ReturnDateTimeStamp>
</OrderItem>
<OrderItem>
<OrderNumber>7847435693</OrderNumber>
<ExternalOrderReference />
<PartnerID>86</PartnerID>
<RetailerStoreNumber>12804</RetailerStoreNumber>
<ProductReferenceID>3304066</ProductReferenceID>
<ReturnedQty>-1</ReturnedQty>
<AmountCredited>31.04</AmountCredited>
<ReturnDateTimeStamp>2007-11-25-17.18.00</ReturnDateTimeStamp>
</OrderItem>
<OrderItem>
<OrderNumber>785757</OrderNumber>
<ExternalOrderReference />
<PartnerID>86</PartnerID>
<RetailerStoreNumber>12278</RetailerStoreNumber>
<ProductReferenceID>2000130</ProductReferenceID>
<ReturnedQty>-1</ReturnedQty>

Thanks in advance
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Which option from Import have you chosen (sequential file or XML table) ? As far as I can recall, you don't need to specify a delimiter using the XML table importer.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
HanuKoya
Premium Member
Premium Member
Posts: 23
Joined: Tue Oct 10, 2006 8:04 am

Post by HanuKoya »

Thanks Ray for your message.

I'm using Sequential file Table definition. We are loading MQ Feeds into Sequential File. Sometimes the data is comming different formates. I got xml file in unix box.

Do I need to import xml table definitions? or is it ok for importing in Sequential file?.
When I try to give delimitor , It is giving error so can you please help me regarding this issue.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why do you think the delimiter should be "/"? That doesn't really make sense - you'd be parsing partway through the end tags.

Try using 000 (for no delimiter between fields).

Though I really believe that you need to import the XML table definition to make any sense of this file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

It's "almost" xml....is this the whole thing? ...or did you just cut and paste a chunk from the middle. The first "order item" is incomplete as it lacks an opening tag...is it really there and just not in this entry?

...if so, this is a simple snippet of xml. Use the XML stage...you will want to make it a whole xml document for meta data import (add <?xml version="1.0" ?><all> to the top of it and </all> to the bottom and be sure you can open it as <yourFileName.xml> in Internet Explorer.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

It's "almost" xml....is this the whole thing? ...or did you just cut and paste a chunk from the middle. The first "order item" is incomplete as it lacks an opening tag...is it really there and just not in this entry?

...if so, this is a simple snippet of xml. Use the XML stage...you will want to make it a whole xml document for meta data import (add <?xml version="1.0" ?><all> to the top of it and </all> to the bottom and be sure you can open it as <yourFileName.xml> in Internet Explorer.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply