Read xml on Datastage 7.5.3 PX

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
snorky95
Participant
Posts: 18
Joined: Thu Jul 10, 2008 2:50 pm

Read xml on Datastage 7.5.3 PX

Post 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
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post 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
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
snorky95
Participant
Posts: 18
Joined: Thu Jul 10, 2008 2:50 pm

Post 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 ?
snorky95
Participant
Posts: 18
Joined: Thu Jul 10, 2008 2:50 pm

Post 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 !!
dspradeep
Participant
Posts: 59
Joined: Fri Aug 21, 2009 12:58 am

Post 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
dspradeep
Participant
Posts: 59
Joined: Fri Aug 21, 2009 12:58 am

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

ditto... but remove the d: ...that is likely the issue. The External Source thinks it is running in a unix environ....
Ernie Ostic

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