xml files

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
pukars4u
Participant
Posts: 24
Joined: Tue Dec 27, 2005 6:27 pm

xml files

Post by pukars4u »

I have n number of Xml files ... and I need to read those xml files one by one(all have same metadata) and then do some transformation for the logic

My problem here in parallel is I don,t have FOlder stage to do.How can I implement this in parallel

Anyone have an idea abt this

THis will help me a lot
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why not do it as a Server job? Does it require a PX implementation?
-craig

"You can never have too many knives" -- Logan Nine Fingers
pukars4u
Participant
Posts: 24
Joined: Tue Dec 27, 2005 6:27 pm

Post by pukars4u »

I can implement in server Job.But I want it to implement in PX.Is there any way that i can implement the same in PX
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not sure. The Sequential stage in PX can support bringing in multiple wild-carded files without having to cat them together. However, I don't know if it can supply just the filename of each file rather than the file's data. If that's the case, you can use the URL method in the XML Input stage.

Or roll your own external command to return the filenames to the XML Input stage.

Or perhaps someone will chime in with something more better for PX. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Post by mctny »

chulett wrote:Not sure. The Sequential stage in PX can support bringing in multiple wild-carded files without having to cat them together. However, I don't know if it can supply just the filename of each file rather than the file's data. If that's the case, you can use the URL method in the XML Input stage.

Or roll your own external command to return the filenames to the XML Input stage.

Or perhaps someone will chime in with something more better for PX. :wink:
yes you can use as many files as you want, in your sequential stage, and you can also use wildcard characters in those file names,

thanks
cetin
Thanks,
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
shawn_ramsey
Participant
Posts: 145
Joined: Fri May 02, 2003 9:59 am
Location: Seattle, Washington. USA

Re: xml files

Post by shawn_ramsey »

pukars4u wrote:I have n number of Xml files ... and I need to read those xml files one by one(all have same metadata) and then do some transformation for the logic

My problem here in parallel is I don,t have FOlder stage to do.How can I implement this in parallel

Anyone have an idea abt this

THis will help me a lot
External Source -> XML Input -> Rest of processing

Use the external source to get a list of XML files to process. We on Linux so I put find /data3/XMLLogin/ -name '*.xml' -print -type f as the command (not exactly sure what you would use for windows). This command gives you a list of file names with path. Feed this into the XML Stage and set the Column Content to URL/File path.

That is it.
Shawn Ramsey

"It is a mistake to think you can solve any major problems just with potatoes."
-- Douglas Adams
Post Reply