Reading multiple xml files using 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
skadiam
Participant
Posts: 6
Joined: Thu Feb 02, 2012 11:05 pm

Reading multiple xml files using External Source stage

Post by skadiam »

Hi, I tried reading multiple xml files using External Source stage.. I mean I used the ls command to list out the files in the dir. But the issue is there are around 50000 files in the dir and I am getting the error like too many return values. I shall send the exact error by tomorrow. Seems like the list is large and not able to capture this list. When I tried say some 25000 files its working fine..Is there a way to read all the 50000 files at the same time.
sk
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Please start a new topic with this new and independent question....
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So let it be written, so let it be done. :wink:

A quick google for "argument list too long" (which is what I assume your issue is) should help with alternatives to the ls you are doing.
-craig

"You can never have too many knives" -- Logan Nine Fingers
skadiam
Participant
Posts: 6
Joined: Thu Feb 02, 2012 11:05 pm

Post by skadiam »

Hi Thanks a lot for your advise, I got the solution for this. I used the below command in the External source stage and it worked fine..

find ./ -maxdepth 1 -name "*.txt"

Thanks again..
sk
Post Reply