I am building a simple SSIS project using Visual Studio which needs to copy a standardized column from hundreds of flat files into their respective rows into a SQL Server table.
All flat files have the same format and are placed into a folder alphabetically which is looped through and has one column copied over per file into the next available column of the SQL Server table.
The looping process follows this guide. The results are intended to work like the following:
file_1
---------------------
col_1 col_2 col_3
----- ----- -----
1 a d
2 b e
3 c f
file_2
---------------------
col_1 col_2 col_3
----- ----- ------
1 g j
2 h k
3 i l
Table_1
-------------------------------
col_1 file1_Col2 file2_col2
----- ---------- ----------
1 a g
2 b h
3 c i
The issue arises in how to map the same column of each flat file to the next column of the SQL Server table. I am wondering if it is possible to create a string variable that could be used as a pointer to the next column or if there is a property I could adjust to achieve this effect?