Page 1 of 1

File Pattern property

Posted: Sun Mar 25, 2007 11:50 pm
by Havoc
Hi everyone,

Well my doubt is surrounding the File Pattern property of the Sequential File Stage. The scenario i'm dealing with is like this:

There's a file TestControl.txt which contains the list of files present in the same folder. TestControl.txt looks like:

Test1.txt
Test2.txt
Test3.txt

The job has to read all the files present in TestControl.txt . We get the file TestControl.txt before the load and we have to ensure that we are reading only the files present in TestControl.txt and none of the other files present in the folder. I read in the parallel job developer's guide that the File Pattern Property:-

Specifies a group of files to import. Specify file containing a list of files
or a job parameter representing the file.


I tried this out, the sequential file stage where the File Pattern property was being used had the same table definition of Test1.txt,etc,etc... But it kept reading the filenames instead of the data.

Is the Sequential File stage setup wrongly (Or) Is this not achievable using File Pattern?

Posted: Mon Mar 26, 2007 5:11 am
by ray.wurlod
File Pattern is NOT read from another file; the property value must be the wildcard itself. For example, in your case, Test?.txt would be a suitable value.

What you need to do is to read TestControl.txt in an ExecuteCommand activity in a job sequence then supply its output as a "list of things" to a StartLoop activity.