Just encounter an issue when using Asynchronous Transformation in SSIS. For simplifier the question, lets say I just have two outputs, "Name" and "Id".
My C# code is:
string name = "";
string Id = "";
if(...) // read the first line to get Name and partial value of "Id"
{
Output0Buffer.AddRow();
Output0Buffer.Name = Row.Name.Trim();
Id = Row.Id.Trim();
}
else if(...) //read the 2nd line to get the rest part of "Id"
{
Output0Buffer.Id = Id + Row.Id.Trim();
}
So ideally, when two outputs fill the Output0Buffer, "Name" and "Id" will be output, but the issue is, when the 2nd line was read into the buffer, it initialize the String Id
again, so the concatenation Output0Buffer.Id = Id + Row.Id.Trim();
does not work. (it works just like "" + rest part of the Id
because the 1st part get initialized and 2nd part is the current value)
I would like to stick to use script component transformation at this moment, is there any ways to solve this?