Issue Reading Windows Path in 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
sathya_anjan
Participant
Posts: 20
Joined: Tue Feb 02, 2010 4:49 am
Location: United Kingdom

Issue Reading Windows Path in External Source Stage

Post by sathya_anjan »

All,

I am using External Source Stage to Read XML file Name and pass this to the subsequent XML Input stage. I am choosing the URL path in XML Input stage.

The issue is with the Specific Program in External Source Stage. I need to read a file say "A.xml" which is placed in "D:/FILES" in the Windows Server. When I type the command "ls D:/FILES/A.xml", I am getting an error wherein it is unable to recognize D:/ drive. Error says "Invalid hostname: ls D"

From seeing prior and relevant posts, I understand External Source Stage reads file from the default installation path. I do not want to place all my source files in this default installation directory but need this to be configured as a parameter for me to change path based on requirement.

Any help on this will be much appreciated.

Thanks

Sathya
passtosekar
Participant
Posts: 3
Joined: Tue Nov 10, 2009 2:46 am

Re: Issue Reading Windows Path in External Source Stage

Post by passtosekar »

sathya_anjan wrote:All,

I am using External Source Stage to Read XML file Name and pass this to the subsequent XML Input stage. I am choosing the URL path in XML Input stage.

The issue is with the Specific Program in External Source Stage. I need to read a file say "A.xml" which is placed in "D:/FILES" in the Windows Server. When I type the command "ls D:/FILES/A.xml", I am getting an error wherein it is unable to recognize D:/ drive. Error says "Invalid hostname: ls D"

From seeing prior and relevant posts, I understand External Source Stage reads file from the default installation path. I do not want to place all my source files in this default installation directory but need this to be configured as a parameter for me to change path based on requirement.

Any help on this will be much appreciated.

Thanks

Sathya
Hi Sathya,
Use folder stage to get the xml file names using wildcard charater and pass this output (filename) to xml Input Stage for reading.

External source stage is used to exexute External commands like sql,os commands.

By,
SSekar.
sathya_anjan
Participant
Posts: 20
Joined: Tue Feb 02, 2010 4:49 am
Location: United Kingdom

Post by sathya_anjan »

Hi Sekar,

Thanks for your reply. The solution you gave works with Server Jobs and I am aware of it. This problem is with Parallel Extender. Since there is no Folder Stage, we can acheive this through:

1. External Source Stage to pass on the File name to XML Input Stage.
2. Row generator in conjunction with Transformer stage to pass file name to the XML input Stage.

I need help with 1st option in configuring the Source file path on the Windows box using External Source Stage.

Thanks

Sathya
Post Reply