Nov 24, 2010

SSIS - Script Component, Split single row to multiple rows - Sudeep's Domain

We have a text file and we need to read each row and the output would have multiple rows per row in the input file.

Input File:


Expected output:

2010-01-01 01
2010-01-03 03
2010-02-01 01
2010-02-02 02
2010-02-03 03
2010-02-04 04

Nov 23, 2010

SSIS - Expression to get File Name from File Path - Sudeep's Domain

Scenario: How to extract the file name from a file path where the number of sub folders or name of folder is not fixed. In simple terms you do not know the position where the file name starts.

Typical example: You have a foreach loop set to traverse sub folders and you set the retrieve file name to "fully qualified" and in parameter mapping you map this to a string variable strFilePath. You use this variable to set up the connection string for may be a flat file source(will not be discussing that). Now lets say you need to retrieve the file path for logging purpose or sending a mail. How do we do this??