PipelineComponent.ProcessInput 方法

Called at run time when a PipelineBuffer from an upstream component is available to the component to let the component process the incoming rows.

命名空间:  Microsoft.SqlServer.Dts.Pipeline
程序集:  Microsoft.SqlServer.PipelineHost(在 Microsoft.SqlServer.PipelineHost.dll 中)

语法

声明
Public Overridable Sub ProcessInput ( _
    inputID As Integer, _
    buffer As PipelineBuffer _
)
用法
Dim instance As PipelineComponent 
Dim inputID As Integer 
Dim buffer As PipelineBuffer

instance.ProcessInput(inputID, buffer)
public virtual void ProcessInput(
    int inputID,
    PipelineBuffer buffer
)
public:
virtual void ProcessInput(
    int inputID, 
    PipelineBuffer^ buffer
)
abstract ProcessInput : 
        inputID:int * 
        buffer:PipelineBuffer -> unit  
override ProcessInput : 
        inputID:int * 
        buffer:PipelineBuffer -> unit
public function ProcessInput(
    inputID : int, 
    buffer : PipelineBuffer
)

参数

  • inputID
    类型:System.Int32
    The ID of the input of the component.

注释

The ProcessInput method is called to provide the component a full PipelineBuffer object that contains rows from the upstream component. The columns contained in buffer include those columns defined in the IDTSInputColumnCollection100 of the component. If the component has synchronous outputs, the buffer will also include the columns added to the output column collection by the component, and all the columns in the output column collection of the components upstream from the component. Columns are located in a buffer row using the FindColumnByLineageID method of the BufferManager.

ProcessInput will be called repeatedly as the data flow task receives full buffers from the upstream components. The ProcessInput method is called until the EndOfRowset property is true.

The correct pattern for using the NextRow method and the EndOfRowset property is:

while (buffer.NextRow())

{

// Do something with each row.

}

if (buffer.EndOfRowset)

{

// Optionally, do something after all rows have been processed.

}

示例

public override void ProcessInput( int inputID, PipelineBuffer buffer )
{
    while( buffer.NextRow() )
    {
        // TODO: Read or write data to the columns in the buffer.
    }
}
Public Overrides Sub ProcessInput(ByVal inputID As Integer, ByVal buffer As PipelineBuffer) 
 While buffer.NextRow 
  ' TODO: Read or write data to the columns in the buffer.
 End While 
End Sub

请参阅

参考

PipelineComponent 类

Microsoft.SqlServer.Dts.Pipeline 命名空间