Page 1 of 1

Read xml on Datastage 7.5.3 PX

Posted: Wed Oct 07, 2009 4:09 am
by snorky95
Hello everybody,

I have touble reading a xml file in a px job :
ExtSrc_fic_Chargts,0: Consumed more than 100000 bytes looking for record delimiter; aborting

I am looking for a method to read my xml file on PX.
What i used is External_source with code inside

Code: Select all

cat my_file.xml | tr "\n" " " | tr -d "\t" | awk '{ print $0 }'
and then XML input file

It works for a small file (<20ko) but failed as soon as the weight is more important. Big problem if i want at least to use file more than 2mo !!!!

So, if someone has a solution, i'll be thanksfull !

F

Posted: Wed Oct 07, 2009 4:41 am
by eostic
Don't use the Sequential Stage....use the External Source stage...go to the table of contents at my blog url below...there is a section on reading xml documents...... you pass the full qualified filename of your xml into the xmlinput stage...

Ernie

Posted: Wed Oct 07, 2009 5:01 am
by snorky95
I never used sequential stage, I said, I use External_source

I tried to access your blog, but i cant from my office

can you copy the article i need, or mail it ?

Posted: Wed Oct 07, 2009 5:33 am
by snorky95
Thanks for your help eostic

we finally find the solution !!

In fact, we just put via the external_source the name of the xml file we want to use in the XML input file job !!!

like :

Code: Select all

echo my_file.xml
and then, in the XML input file job, we choose "URL/path name" as "Column content" in the input onglet.

And then, it works perfectly !!!

hope this will be helpfull for others !!

Posted: Tue Nov 17, 2009 6:38 am
by dspradeep
Hi,

I have tried this below command in External Source Stage (specific program place)

Code: Select all

 echo d:\folder1\myfile.xml 
but job get aborted

I will give the steps which i did then you can easily correct me if i made anything wrong

1. in ESS

Specific program --> echo d:\folder1\myfile.xml
column --> Content, varchar 200
2. in XML Input
Under input tab
XML Source Column as "Content"
Column content is URL/Filepath
Under output
use the already imported metadata to selected required tag and verified the XPATH info also.

Please suggest me ASAP

Posted: Tue Nov 17, 2009 7:06 am
by dspradeep
Hi,

I have tried this below command in External Source Stage (specific program place)

Code: Select all

 echo d:\folder1\myfile.xml 
but job get aborted

I will give the steps which i did then you can easily correct me if i made anything wrong

1. in ESS

Specific program --> echo d:\folder1\myfile.xml
column --> Content, varchar 200
2. in XML Input
Under input tab
XML Source Column as "Content"
Column content is URL/Filepath
Under output
use the already imported metadata to selected required tag and verified the XPATH info also.

Please suggest me ASAP

Posted: Tue Nov 17, 2009 8:43 am
by chulett
Why ASAP? Where is anyone's motivation to do anything for you "ASAP" here? Sheesh. Play that game with your official support provider, not us. :evil:

And you are not helping your cause by repeating posts and hijacking any other XML thread you can find. When you have an issue, start a new post.

Posted: Tue Nov 17, 2009 7:41 pm
by eostic
ditto... but remove the d: ...that is likely the issue. The External Source thinks it is running in a unix environ....