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.
Reading Multiple Files from a source Directory
Moderators: chulett, rschirm, roy
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 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.
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
Thanks
DSDexter
DSDexter