Here's my folder setup.
Here's the File setup
The idea is to traverse through the folders & put FileA contents to Table FileA.dbo on the database ( also FileB,FileC etc). The FileName structure is same throughout all the folders.
I have this ssis package where I parse through the folders with a foreachloop-> dataflow.
I have checked that the algorithm I've formulated to get the filename is working
REVERSE(Substring(Reverse( @[User::FileName] ),5,LEN( @[User::FileName] ))) == "FileA"
It parses out the .txt extension. Below is the setup of the foreach loop I have.
To start this whole package I've .txt files inside the folder & I make the foreach container loop subfolders.
Since, I'm not really a SSIS package developer, this is the best I could do with some research. The problem I'm running into is, it seems to work partially.
The snapshots are mockups of the scenario I have and in reality I have over 200 folders with 50 text files each designated to dump the contents to respective named tables.
But the total number of rows I'm seeing after the package successfully executes is extremely low & can't be right. Is there anyway to get a count/list of the number of folders it traversed. Also, am I doing something wrong ?
Ideally, I'd just like to not have to start with .txt files but just have the whole thing go to folders, get the filenames ( which I think I've a working code for) & just dump all the info to the OLEDB Destinations.
Any help, link to resources is much appreciated.