H guys. I'm developing a custom component for SSIS. I'm having a problem when processing inputs. The problem is that the "ProcessInput" method gets executed more than once. Two times in this case.
This is the process input snippet:
public override void ProcessInput(int inputID, PipelineBuffer buffer)
{
IDTSInput90 input = ComponentMetaData.InputCollection.GetObjectByID(inputID);
if (input.InputColumnCollection.Count > 0)
{
while (buffer.NextRow())
{
try
{
for (int columnIndex = 0; columnIndex < input.InputColumnCollection.Count; columnIndex++)
{
ColumnInfo columnInfo = _columnInfos[input.InputColumnCollection[columnIndex].ID];
IDTSInputColumn90 inputColumn = input.InputColumnCollection[columnIndex];
try
{
//write to destination
}
catch (Exception writeEx)
{
throw new Exception("Couldn't write to destination");
}
}
}
catch (Exception ex)
{
throw ex;
}
}
}
else
{
throw new Exception("There is no columns in the input collection");
}
}
I have no idea why its being called twice. This is the dataflow:
And this is the mapping window: