Page 1 of 1

Reading Multiple Files from a source Directory

Posted: Mon Jun 08, 2009 4:25 am
by Gokul
Hi ,

I am trying to read multilpe files from a file landing directory and also obtain the individual file name as one of the output column
I have used Sequential file stage's File Pattern Property to read multiple files and File Name Column option to get the individual File Name.

There are 2 source files in the landing directory. When I execute the job, the first file name is also repeated for the records of the second file .

I even tried using the environment variable APT_IMPORT_PATTERN_USES_FILESET . But the ouput was same.

Posted: Mon Jun 08, 2009 6:39 am
by chulett
Well, that $APT variable ( and perhaps one more) have made this work for others. What 7.x version are you running?

Posted: Mon Jun 08, 2009 7:23 am
by Gokul
The other variable $APT_IMPORT_PATTERN_USES_FILESET_MOUNTED is not in the version 7.5x2 ( which I am currently using).

Posted: Mon Jun 08, 2009 7:35 am
by chulett
So your O/S is actually Windows? :?

What happens if you simply add it? I would suspect if it still doesn't work it's an issue in that old/unique version.

Posted: Wed Jun 10, 2009 2:00 am
by Gokul
The variable $APT_IMPORT_PATTERN_USES_FILESET_MOUNTED is not supported in version I am using.

I tried a workaound and its working.
In the sequential file stage, I used Read Method = Specific Files and used 15 different File properties. Each property specifiying name of one of 15 files.

Also the option Missing File Mode = OK was set.

With these setting I was able to extract the file names of the records I was reading and this worked even if some of the files were missing.

Posted: Wed Jun 10, 2009 4:15 am
by DSDexter
Gokul wrote:The variable $APT_IMPORT_PATTERN_USES_FILESET_MOUNTED is not supported in version I am using.

I tried a workaound and its working.
In the sequential file stage, I used Read Method = Specific Files and used 15 different File properties. Each property specifiying name of one of 15 files.

Also the option Missing File Mode = OK was set.

With these setting I was able to extract the file names of the records I was reading and this worked even if some of the files were missing.

I hope that you wont get more than 15 files using this method, Else that could recall trouble :twisted:

Posted: Wed Jun 10, 2009 4:35 am
by Gokul
Not until , we are upgrading to DS 8