M M
asked on
SSIS- Must read an input file that has a file name that matches a specific pattern.
SSIS -We have a SSIS package that reads an input file (from a list of files) and load it into a SQL table. Currently the SSIS package has a file connection manager with hardcoded file name. Now we need to modify the package to look for a file name that matches a very specific pattern. For example - xyz[123]abc.csv. The parenthesis is a placeholder that can contain anything. How can I accomplish the above. Thanks.
Quick and dirty? On a linux system? Write a shell script to find the file you want, then make a softlink to the old file name. Then you won't need to fiddle with the code.
ASKER
Dr.Klahn, I am not using linux system. I am using windows. Is it still possible to use the similar approach which you mentioned? Could you please explain the steps involved. Thanks.
Don't know anything about scripting under Windows, but I expect somebody will have a solution for it.
Disclaimer:
Not a SSIS or SQL Server person.
Windows equivalent of a Unix soft link is mklink:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink
Never tried to use it in the Windows world like what the good Dr suggested in the Unix world.
That said, seems like you can use wildcards inside SSIS:
https://social.msdn.microsoft.com/Forums/en-US/dbe09641-f43b-478a-9c12-b46fb8e01b32/foreachloop-wildcard-filename?forum=sqlintegrationservices
Not a SSIS or SQL Server person.
Windows equivalent of a Unix soft link is mklink:
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mklink
Never tried to use it in the Windows world like what the good Dr suggested in the Unix world.
That said, seems like you can use wildcards inside SSIS:
https://social.msdn.microsoft.com/Forums/en-US/dbe09641-f43b-478a-9c12-b46fb8e01b32/foreachloop-wildcard-filename?forum=sqlintegrationservices
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.