There is a requirement to save File name along with record, so later on we can identify which record comes from which file.
Let me explain it how to achieve with FileNameColumnName property of Flat File Connection to get it easily.
1. Setup Flat File Connection with CSV file, as mentioned Basic Example of Data Flow Task.
2. Right click on Flat File Source, and click on Show Advanced Editor:
3. Click on "Component Properties" and go to FileNameColumnName, Custom properties:
4. Setup FileNameColumnName value with desired column name. Let's say "File Name". Congratulations, This column is added to output list with actual filename of that connection.
Let me know your comments/questions.
Posted by Tejas Shah on November 22, 2017
Posted by Tejas Shah on November 11, 2017
Posted by Tejas Shah on August 12, 2015
Posted by Tejas Shah on June 26, 2015
Posted by Tejas Shah on April 20, 2015