File pattern option for XML file processing

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
techiexavier
Participant
Posts: 39
Joined: Tue Feb 28, 2012 12:59 pm
Location: Chennai

File pattern option for XML file processing

Post by techiexavier »

Hi All,

I have to process more number of XML files of same structure.

Seq file ---> XML Input ---> DataSet

I am using XML input stage. I am planning to use URL/File path option (In XML input stage) and file pattern option for source in Sequential file stage. Can anyone help me how to use both the options in my job. Currently I am having my settings as below,

XML files:

Input_1.xml
Input_2.xml
Input_3.xml

Sequential file stage source option:
/opt/input_file_location/filenames.txt

Content of filenames.txt is - /opt/input_file_location/input_*.xml

So I am expecting, as per the content of filenames.txt which having the pattern of my input files the files will be picked and will be processed.

Note: I can go for folder stage in server jobs, but I am looking for any workaround in parallel job using these stages.

Please share your thoughts on this. Thanks.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Use an External Source stage to deliver the filenames, not a Sequential File stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
techiexavier
Participant
Posts: 39
Joined: Tue Feb 28, 2012 12:59 pm
Location: Chennai

Post by techiexavier »

Thanks for your inputs. I am able to achieve whatever i was trying for.

I have used external file stage to list all the file names and selected the XML document option in XML input stage. It worked.

Thanks.
Post Reply