December 16, 2015 at 11:24 am
Has anyone had a chance to create a package that loops through directory and load files with specific word in file name? For example, flat file source where any file with *customer_Email* in file name.
December 16, 2015 at 12:00 pm
scarlam (12/16/2015)
Has anyone had a chance to create a package that loops through directory and load files with specific word in file name? For example, flat file source where any file with *customer_Email* in file name.
Sure. Use a foreach (file) loop with appropriate wildcards in the filespec.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
December 16, 2015 at 1:00 pm
Can you shed some light on what these appropriate wildcards in filespec might be? I was able to setup to load all files in directory, or load files beginning with certain word, but can't seem to get around setting up where specific name exists in middle of file name. Thanks in advance for your help.:unsure:
December 16, 2015 at 1:50 pm
scarlam (12/16/2015)
Can you shed some light on what these appropriate wildcards in filespec might be? I was able to setup to load all files in directory, or load files beginning with certain word, but can't seem to get around setting up where specific name exists in middle of file name. Thanks in advance for your help.:unsure:
OK, I was assuming that *[search word]*.csv would work (for example), but it seems that multiple uses of a wildcard in the file name are not supported.
So we need to look for another way. There is a method mentioned here which you should be able to adapt to your needs.
The precedence constraint expression you create will, of course, need to look only for the file names you wish to process.
If you have nothing to join your precedence constraint to, just add an empty Sequence container and use that.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply