Search code examples
sqlsql-serverssistransformreadfile

SSIS - Read Mulitple File .txt to SQL Using SSIS


I have a multiple Source Data.

enter image description here

I want to read the data using one SSIS Transform File. I using Foreach Loop Editor.

enter image description here

I can make the SSIS to read the data from that multiple file .txt above. But, when the SSIS's run, that SSIS return one value form Report_S001 even path file that read of SSIS include Report_S002

enter image description here

I Think, it can make because the source file that selected only from Report_001

enter image description here

Any one can help me, so that the SSIS can transform file from two source file .txt with correct Data and with only one execute/run?

My string Connection

enter image description here

The expression enter image description here

Connection string expression enter image description here


Solution

  • I can only guess here, as despite asking what has done to make the connection manager dynamic the OP won't share that information, and the images hide it.

    As a result I assume that they haven't done so.

    You simply need to edit your connect manager. in the properties pane, when the connection manager is selected, Locate `ConnectionString, and select <<expression>> in the drop down. Then set the expression to be the value of the variable that holds the File Path of the file to be loaded.