I'm trying to get the column name and index from the PipelineBuffer in my script component transformation is SSIS and add them to a Hashtable. I know this is possible if I change my class from:public class ScriptMain : UserComponent
to ScriptMain : PipelineComponent
and use this code:
public override void ProcessInput(int InputID, Microsoft.SqlServer.Dts.Pipeline.PipelineBuffer Buffer)
{
inputBuffer = Buffer;
hash = new Hashtable();
IDTSInput100 i = ComponentMetaData.InputCollection.GetObjectByID(InputID);
foreach (IDTSInputColumn100 col in i.InputColumnCollection)
{
int colIndex = BufferManager.FindColumnByLineageID(i.Buffer, col.LineageID);
hash.Add(col.Name, colIndex);
}
}
However; when I do this I can no longer override: public override void Input0_ProcessInputRow(Input0Buffer Row)
Since this is not available in the PipelineComponent class and I can no longer access my connection managers by simply calling something like this: IDTSConnectionManager100 connMgr = this.Connections.DbConnection;
From what I can see the BufferManager is not available in the UserComponent class. Is there a way to accomplish this using the UserComponent?