Not fetching data from XML Input stage

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
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

Not fetching data from XML Input stage

Post by deesh »

Hi,

I have extracting xml data through using below stages

rowgen ---> trans---> xml input----->seq

I have tried with one file it's working fine, but trying with 2nd file not producing data and not getting any error or warning in director logs, it showing success with exporting 0 records.

but both files have same xsd.

but if i give 2nd file schema and namespace declaration,second file also working..

Please help me in this case
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Look at the "xpath" in the Description Properties of the output link of the xmlInput Stage....see if they have prefixes defined in the xpath (such as /xyz:name ) ...if so, then you need the namespaces to be "in" the actual xml......or not, if they aren't there. Look at your documents carefully....something is different about them.

Most often when you get zero rows means that the xpath is wrong, the spelling is wrong, or you have namespaces and no namespaces in the xpath, or namespaces in the xpath and none in the document.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

Post by deesh »

but i think it is not the reason, because both the xml files related to same xsd...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted by Ernie, the difference is in your files. So, what is different between them?
-craig

"You can never have too many knives" -- Logan Nine Fingers
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

If you don't include the namespace in your X-Path, it will not fetch the data. Maybe one of your files is defined with namespace and the other is not. If this is the case, the same X - Path will not work for both.

E.g.,

With namespace:
/ns1:root/ns:1records/ns1:value/text()

Without:
/root/records/value/text()
Arun
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

Post by deesh »

Total xsd contain 950 columns.

but the input file generate with only few columns, input file data columns may change file to file, but columns are satisfy any from 950 columns.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

That's fine. Provided that you aren't getting other errors, rejections, or invalid documents, then something is different ....check the xpaths, check the namespaces ...see if the namespace declarations at the top are different between the documents....... Something is different.

Maybe it is being read incorrectly --- is the difference something about the size? Is one massively larger than the other?

Ernie
Ernie Ostic

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