I assume that your Table-Sales
and Table-Customers
tables have different collections of columns. That means that you are going to have to have one Data Flow task per destination table, at a minimum: each destination table will need its own set of column mappings.
The difficulty with this is that, as the date and timestamps on your source files change, you presumably don't want to have to change each Flat File Connection to point to the right source text file.
The simplest way to handle the situation would be to standardize your file names, in this sense: copy Tbl-Sales-yymmdd-hhmmss.TXT
to a file called Table-Sales.txt
in a different, dedicated directory, Tbl-Customers-yymmdd-hhmmss.TXT
to Table-Customers.txt
in the same dedicated directory, and set up all your Flat File Connection Managers (because you will probably need one per source file type) to point to the files in the dedicated directory. Then you will have a SSIS package that doesn't need custom programming or messing around with variables: as long as the files are there, it will execute without further intervention.
You can probably use SSIS to copy the timestamped files to the right destination file names, or do it with a bit of code, or (possibly) even with an old-fashioned .bat file. There are lots of ways.