I had a scenario where I will get the AD export in CSV format with two columns (samaccountname, GUID) and I had to check if the GUID is null then put the value "0" instead of null value.
Solution:
1. Load the CSV file into SSIS project
2. Make data connection.
3. Add the script component.
4. Edit the Script and overwrite the following function:
public override void Input0_ProcessInputRow(Input0Buffer Row)
{
if (Row.GUID_Input.Length > 0)
{
Row.GUID_Output = Row.GUID_Input;
}
else
{
Row.GUID_Output = "0";
}
}
No comments:
Post a Comment