Need Help reagrding External source 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
DSDexter
Participant
Posts: 94
Joined: Wed Jul 11, 2007 9:36 pm
Location: Pune,India

Need Help reagrding External source stage

Post by DSDexter »

Hi Gurus,

I am using XML input for the first time :oops: . I searched the forum, All of them suggested to use a external source stage with ls command. But can anyone tell me what I need to specify in the Columns and format tab of external source stage?
Thanks
DSDexter
BugFree
Participant
Posts: 82
Joined: Wed Dec 13, 2006 6:02 am

Post by BugFree »

Any reason for not using XML source stage? You can import the metadata for the XML file from the stage. What have you searched on? ls command will give a list of files in a folder. what are you trying to do?
Ping me if I am wrong...
DSDexter
Participant
Posts: 94
Joined: Wed Jul 11, 2007 9:36 pm
Location: Pune,India

Post by DSDexter »

BugFree wrote:Any reason for not using XML source stage? You can import the metadata for the XML file from the stage. What have you searched on? ls command will give a list of files in a folder. what are you trying to do?

External Source Stage ----->XML Input Stage------>Further processing.

This is what I am doing.
Thanks
DSDexter
AmeyJoshi14
Participant
Posts: 334
Joined: Fri Dec 01, 2006 5:17 am
Location: Texas

Post by AmeyJoshi14 »

Hi i am Amey :lol:

In the Source Program you specify the name of the file along with the path name.
example:
find PathName -name "Xml File Name " -print

Set the format to default values.
In the columns you specify any name to the column since it conatins only the file name along with the path.
http://findingjobsindatastage.blogspot.com/
Theory is when you know all and nothing works. Practice is when all works and nobody knows why. In this case we have put together theory and practice: nothing works. and nobody knows why! (Albert Einstein)
DSDexter
Participant
Posts: 94
Joined: Wed Jul 11, 2007 9:36 pm
Location: Pune,India

Post by DSDexter »

I have used the above command, At the output of external source stage I can see the filename along with the path being passed sucessfully, But at the XML Input stage count stays at 0. What could be wrong? :?:
Thanks
DSDexter
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

When XML goes into an XML Input stage but doesn't come back out, it usually means your XPath Expressions are incorrect.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSDexter
Participant
Posts: 94
Joined: Wed Jul 11, 2007 9:36 pm
Location: Pune,India

Post by DSDexter »

I have created a Server job for the same, I have used source as a folder stage, I was able to extract the data from the xml file. Now I am using the same xpaths in the parallel jobs, But still the problem persists.

In folder stage I have two columns viz. Filename (Varchar 25) and record (LongVarchar 999999). And in XML input stage I am using the records column to fetch the xml data.

But in PX I am mentioning only Filename. So does the XML Input Stage extract the data from the filename/filepath it gets from the external source stage???
Thanks
DSDexter
DSDexter
Participant
Posts: 94
Joined: Wed Jul 11, 2007 9:36 pm
Location: Pune,India

Post by DSDexter »

Hi All,

I have resolved the issue, I was specfying the XMLdocument, rather than a URl path.

Thanks all for the inputs :lol:
Thanks
DSDexter
Post Reply