I'm developing a custom component that inherits from a PipelineComponent in SSIS.
This is the "ProvideComponentProperties" snippet of code:
IDTSOutput90 output = ComponentMetaData.OutputCollection.New();
output.Name = "Output";
output.SynchronousInputID = input.ID;
output.ExclusionGroup =0;
m_DefaultOutputId = output.ID;
IDTSOutput90 discardedOutput = ComponentMetaData.OutputCollection.New();
discardedOutput.Name = "Discarded Output";
discardedOutput.SynchronousInputID = output.SynchronousInputID;
discardedOutput.ExclusionGroup = 1;
//I don't want it to be an output
//discardedOutput.IsErrorOut = true;
m_DiscardedOutputId = discardedOutput.ID;
And then in the process input i have this:
while (buffer.NextRow())
{
bool discarded = true;
if (//Discard condition)
{
for (int columnIndex = 0; columnIndex < input.InputColumnCollection.Count; columnIndex++)
{
//Write to buffer
}
discarded = false;
}
if (discarded)
{
buffer.DirectRow(discardedOutput.ID);
}
rowIndex++;
}
The problem i having that is not redirecting the row... the row keep its flow in the "Output" output instead of going thru the "Discarded Output"...
Any Help? thanks