Problems with importing from XML Schema(xsd)

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

himerius
Participant
Posts: 39
Joined: Fri Sep 07, 2007 5:10 am
Location: Sandefjord

Problems with importing from XML Schema(xsd)

Post by himerius »

Hi. I have the Ascential Datastage TX 8.0 (105)
I've imported a tree from xsd schema into type designer. I've imported it with Validation xerces; XSDL Hints Location: All Elements.

When I try using this tree in Map Designer, the results is that it skips every second record in the loop.

xml:
<Period>
<TimeInterval v="2007-02-24T23:00Z/2007-02-25T23:00Z"/>
<Resolution v="PT01H"/>
<Interval><Position v="1"/><Quantity v="51.0"/></Interval>
<Interval><Position v="2"/><Quantity v="52.0"/></Interval>
<Interval><Position v="3"/><Quantity v="53.0"/></Interval>
<Interval><Position v="4"/><Quantity v="54.0"/></Interval>
<Interval><Position v="5"/><Quantity v="55.0"/></Interval>
<Interval><Position v="6"/><Quantity v="56.0"/></Interval>
<Interval><Position v="7"/><Quantity v="57.0"/></Interval>
<Interval><Position v="8"/><Quantity v="58.0"/></Interval>
-----------------------------

Flatfile:

1 51
3 53
5 55
7 57
9 59
11 57
13 55
15 53
17 52
19 54
21 56
23 58


If I import the xml schema with classic mode validation, the data returns correctly, but then if i import it back again from the flat file til xml with classic validation it is not possible to referense the namespace in any way.

Do anyone know about this "bug"?
Oh, and I have tried it on vista and xp pc.
himerius
Participant
Posts: 39
Joined: Fri Sep 07, 2007 5:10 am
Location: Sandefjord

Post by himerius »

Does anyone have any idea how to solve this problem?
Earlier we have just mapped flatfiles, but as it seems, there will be more and more mapping with xml to flatfile.
How do you guys import xml schemas when you map to flatfiles?
rep
Participant
Posts: 82
Joined: Tue Jun 19, 2007 8:04 am
Location: New York City

...

Post by rep »

So you're sure the problem is in the type tree, and not in the map?

I've only briefly worked with XML importing and type trees, so there's very little I can offer. I would say build a test map and mess with it. Have the input the xml and just a simple one record, one blob field, with the rec (S) and make sure that the map is counting every record. Have you viewed the trace file and check if it's seeing every record as a record? Checking the index/postition? Stuff like that?
himerius
Participant
Posts: 39
Joined: Fri Sep 07, 2007 5:10 am
Location: Sandefjord

Post by himerius »

Thank you for answering.

Well, I would assume the problem is the type tree. Since its working with the Classic validation, but as soon as I try to import it with Xerces validation, the error with ignoring every second record occurs. I'we tried it with only one looping record as well.
When I import it with xerces, i get the following warning messages.

Warning 50 reference 1340: Type exists and is not over written.
Warning 50 reference 1365: Type exists and is not over written.
Warning 50 reference 1371: Type exists and is not over written.
Warning 50 reference 1536: Type exists and is not over written.
Warning 50 reference 1539: Type exists and is not over written.
Warning 50 reference 1542: Type exists and is not over written.

Dont know if this of any significanse?
Other people on my work has tested it too, but cant get it to work.

I do not get this error if i use classic validation.

I map these 2 trees exactely the same, but with different validation only. And as I said, it works fine with the "classic" tree.
So mapping from XML->flatfile is really not a problem, cause I can use the Classic validation, but if I use the classic validation for flatfile->XML, I wont get the namespace referance back into the XML file, cause you dont have that option on the card.

I will look into tracefile next time I compile, and update this post.
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

I have had numerous errors using the Xerces importer since release 8. I have had them resolved with patches so I would advise contacting support.
himerius
Participant
Posts: 39
Joined: Fri Sep 07, 2007 5:10 am
Location: Sandefjord

Post by himerius »

Ah, ok. Do you have link to the newest patchfiles? Or the patches you used? Haveing problems finding them, my version is 8.0(105), dunno if that is the newest.

*I am also in contact with support, but they take a lot of time, and have redirected me once allready. Not answered my last mail yet either..
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

You have to get patches from support as they may be specific to your site.
Latest version of WTX available is 8.1.0.2 build 38. This may solcve many of your problems.
himerius
Participant
Posts: 39
Joined: Fri Sep 07, 2007 5:10 am
Location: Sandefjord

Post by himerius »

The upgrade solved the problem!
Was pain in hell finding and successfully downloading the patch though.
I now have version 8.0(124).
himerius
Participant
Posts: 39
Joined: Fri Sep 07, 2007 5:10 am
Location: Sandefjord

Post by himerius »

janhess wrote:You have to get patches from support as they may be specific to your site.
Latest version of WTX available is 8.1.0.2 build 38. This may solcve many of your problems.
Just wondering here, the 8.1 youre refering to here is for tranformation extender is it? Or does a 8.1 exsist for the "normal" datastage too?
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

8.1.0.2 is just WTX as far as I know and it is pronounced like Xerces.
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

8.0 (124) is just an update to release 8. 8.1.0.2 is the second service pack for release 8.1 so you will need to request the release upgrade. If you have a service contract you should get it automatically.
rep
Participant
Posts: 82
Joined: Tue Jun 19, 2007 8:04 am
Location: New York City

.........

Post by rep »

Awesome! So when I call support at the end of our contract, it'll be like,


"50,000 and a one year commitment is all the God Code "Xerces" requires."

"You bring the heads of conquers integration software to my city steps, you threaten my staff with master/slavery environments and the blue screens of death. Oh I've chosen my words carefully support person, you should have done the same."
"This is blasphemy, This is mapping!"
"Mapping?...THIS IS SPARTA!"




I tried.....


I failed, but I tried. I think it just said I lost 50 points for this post.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

:lol:

Remember Thermopylae!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
himerius
Participant
Posts: 39
Joined: Fri Sep 07, 2007 5:10 am
Location: Sandefjord

Post by himerius »

Hey, got another potential problem here.
I've mapped xml->flatfile->xml, but take a look at the end result:

Base xml:

Code: Select all

<Resolution v="PT01H"/>
Xsd:

Code: Select all

<xs:element name="Resolution" type="ecc:ResolutionType"/>
Output xml:

Code: Select all

<Resolution v="PT01H"></Resolution>
Shouldnt it in the output according to the xsd have a closed tag?
:roll:

*edit:
I have the same patch as you guys have now, but when i try to export the map to xml i crashes immediately
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

It's got one - </Resolution> is the closing tag.

If your export is still crashing then it's obviously a new bug and needs reporting to Support. I'm always finding bugs with Xerces.

You could try posting to a forum that allows you attachments such as http://www-128.ibm.com/developerworks/f ... =829&cat=9 so I can try it.
Post Reply