PipelineBuffer 클래스

정의

데이터의 행 및 열을 포함하는 메모리 내 데이터 저장소를 제공합니다.

public ref class PipelineBuffer : IDisposable
public class PipelineBuffer : IDisposable
type PipelineBuffer = class
    interface IDisposable
Public Class PipelineBuffer
Implements IDisposable
상속
PipelineBuffer
구현

예제

다음 예제에서는 in의 PipelineBufferProcessInput행과 열을 반복하는 변환 구성 요소를 보여 줍니다.

using System;  
using Microsoft.SqlServer.Dts;  
using Microsoft.SqlServer.Dts.Pipeline;  
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;  
using Microsoft.SqlServer.Dts.Runtime.Wrapper;  

namespace Microsoft.Samples.SqlServer.Dts  
{  
   [DtsPipelineComponent  
   (  
   DisplayName="SampleComponent",  
   ComponentType=ComponentType.Transform  
   )]  
   public class SampleComponent: PipelineComponent  
   {  
      public override void ProvideComponentProperties()  
      {  
         base.ProvideComponentProperties();  

         ///Name the input and output add by the base class.  
         ComponentMetaData.InputCollection[0].Name = "SampleInput";  
         ComponentMetaData.OutputCollection[0].Name = "SampleOutput";  
      }  

      public override void ProcessInput(int inputID, PipelineBuffer buffer)  
      {  

      IDTSInput100 input = ComponentMetaData.InputCollection.GetObjectByID(inputID);  

      while (buffer.NextRow())  
      {  
         foreach (IDTSInputColumn100 col in input.InputColumnCollection)  
         {  
            int colIndex = BufferManager.FindColumnByLineageID(input.Buffer,col.LineageID);  
            object colData = buffer[colIndex];  
            //TODO: Do something with the column data.  
         }  
      }  
      }  
   }  
}  

다음 예제에서는 출력 버퍼에 행을 추가하는 원본 구성 요소를 보여 줍니다 PrimeOutput.

using System;  
using Microsoft.SqlServer.Dts;  
using Microsoft.SqlServer.Dts.Pipeline;  
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;  
using Microsoft.SqlServer.Dts.Runtime.Wrapper;  

namespace Microsoft.Samples.SqlServer.Dts  
{  
   [DtsPipelineComponent  
   (  
      DisplayName="SampleComponent",  
      ComponentType=ComponentType.SourceComponent  
)]  
   public class SampleComponent: PipelineComponent  
   {  
      public override void PrimeOutput(int outputs, int[] outputIDs,PipelineBuffer[] buffers)  
      {  
         int rows = 100;  
         PipelineBuffer buf = buffers[0];  
         IDTSOutput100 output = ComponentMetaData.OutputCollection[0];  
         Random rand = new Random();  

         //Loop rows number of times  
         for(int r = 0; r < rows; r++)  
         {  
            buf.AddRow();  
            foreach( IDTSOutputColumn100 col in output.OutputColumnCollection)  
            {  
               int colIndex = BufferManager.FindColumnByLineageID( output.Buffer, col.LineageID);  
               // Note, buffer columns containing binary large objects  
               // can not be set using the following syntax. Instead,  
               // the AddBlobData and SetBytes methods are used.  
               buf[colIndex] = rand.Next();  
            }  
         }  
         buf.SetEndOfRowset();  
      }  
   }  
}  

설명

PipelineBuffer 과 열을 포함하는 메모리 내 2차원 데이터 저장소입니다. 데이터 흐름 태스크에 의해 생성되고 실행 중에 관리되는 데이터 흐름 구성 요소에 제공됩니다. 버퍼에 포함된 열은 그래프의 구성 요소 컬렉션에 있는 IDTSOutputColumnCollection100 열을 기반으로 합니다.

비동기 출력이 있는 원본 구성 요소 및 구성 요소는 다운스트림 구성 요소에 연결된 각 출력 개체에 대한 버퍼를 받습니다. 이러한 버퍼를 출력 버퍼라고 하며 행을 포함하지 않습니다. 출력 버퍼를 수신하는 구성 요소는 버퍼에 행을 추가하고 완료되면 메서드를 SetEndOfRowset 호출합니다. 이 메서드는 속성 trueEndOfRowset 값을 최종 버퍼에 설정합니다. 그런 다음 데이터 흐름 태스크는 그래프의 다음 구성 요소에 해당 버퍼를 제공합니다.

동기 출력 및 대상 구성 요소가 있는 변환 구성 요소는 메서드의 개체를 ProcessInputPipelineBuffer 습니다. PipelineBuffer 이 메서드에서 받은 버퍼이며 Input 업스트림 구성 요소에 의해 추가된 행을 포함합니다. 이 버퍼는 제한되며 버퍼에서 행을 추가하거나 제거하는 데 사용할 수 없습니다.

관리 PipelineBuffer 코드로 작성되며 관리 코드와 기본 COM 개체 간에 데이터를 마샬링하여 관리되는 데이터 흐름 구성 요소 개발자를 IDTSBuffer100 지원합니다.

Integration Services 데이터 형식의 전체 목록과 각 데이터 형식에 사용할 클래스의 PipelineBuffer 해당 GetSet 메서드는 Data Flow 데이터 형식 작업을 참조하세요.

생성자

PipelineBuffer(IntPtr, PipelineBufferMode)

PipelineBuffer의 새 인스턴스를 인스턴스화합니다.

PipelineBuffer(UInt32, UInt32, UInt64, IntPtr*, DTP_BUFFCOL*, Boolean)

PipelineBuffer 클래스의 새 인스턴스를 초기화합니다.

속성

ColumnCount

PipelineBuffer의 열 수를 가져옵니다.

ColumnInfo

열에 대한 읽기 전용 메타데이터를 가져옵니다.

CurrentRow

PipelineBuffer에서 현재 행의 인덱스를 가져옵니다.

EndOfRowset

현재 PipelineBuffer가 최종 버퍼인지 여부를 나타내는 값을 가져옵니다.

Item[Int32]

현재 행의 지정된 열 값

Mode

PipelineBufferIDTSInput100 버퍼인지 IDTSOutput100 버퍼인지 나타내는 값을 가져옵니다.

RowCount

PipelineBuffer 개체의 행 수를 가져옵니다.

RowSize

PipelineBuffer 개체의 행 크기를 가져옵니다.

RowStarts

행의 시작 지점을 가져옵니다.

메서드

AddBlobData(Int32, Byte[])

PipelineBuffer 열에 바이트 배열을 추가합니다.

AddBlobData(Int32, Byte[], Int32)

PipelineBuffer 열에 지정한 바이트 수 배열을 추가합니다.

AddRow()

PipelineBuffer 개체에 행을 추가합니다.

DirectErrorRow(Int32, Int32, Int32)

속성이 PipelineBuffer true인 행을 IDTSOutput100IsErrorOut 보냅니다.

DirectErrorRow(Int32, Int32, Int32, Int32)

속성이 PipelineBuffer true인 행을 IDTSOutput100IsErrorOut 보냅니다.

DirectRow(Int32)

PipelineBuffer에서 지정한 IDTSOutput100으로 행을 보냅니다.

Dispose()

PipelineBuffer에서 사용하는 모든 리소스를 해제합니다.

Dispose(Boolean)

PipelineBuffer에서 사용하는 관리되지 않는 리소스를 해제하고 관리되는 리소스를 선택적으로 해제합니다.

Finalize()

PipelineBuffer에서 사용하는 모든 리소스를 해제합니다.

GetBlobData(Int32, Int32, Int32)

PipelineBuffer 열에 저장된 BLOB(Binary Large Object)에서 바이트 배열을 검색합니다.

GetBlobLength(Int32)

BLOB(Binary Large Object) PipelineBuffer 열에 포함된 바이트 수를 가져옵니다.

GetBoolean(Int32)

열에 저장된 PipelineBuffer 부울 값을 가져옵니다.

GetByte(Int32)

열에 저장된 PipelineBuffer 바이트 값을 가져옵니다.

GetBytes(Int32)

버퍼 열에 저장된 바이트 배열을 가져옵니다.

GetColumnInfo(Int32)

BufferColumn 열에 대한 PipelineBuffer 구조를 검색합니다.

GetDate(Int32)

열에 저장된 PipelineBuffer DateTime 값을 가져옵니다.

GetDateTime(Int32)

열에 저장된 PipelineBuffer DateTime 값을 가져옵니다.

GetDateTimeOffset(Int32)

열에 저장된 PipelineBuffer DateTimeOffset 값을 가져옵니다.

GetDecimal(Int32)

열에 저장된 PipelineBuffer 10진수 값을 가져옵니다.

GetDouble(Int32)

열에 저장된 double을 PipelineBuffer 가져옵니다.

GetGuid(Int32)

열에 저장된 PipelineBuffer Guid 값을 가져옵니다.

GetInt16(Int32)

열에 저장된 짧은 값을 PipelineBuffer 가져옵니다.

GetInt32(Int32)

열에 저장된 int를 PipelineBuffer 가져옵니다.

GetInt64(Int32)

열에 저장된 긴 값을 PipelineBuffer 가져옵니다.

GetSByte(Int32)

열에 저장된 PipelineBuffer SByte 값을 가져옵니다.

GetSingle(Int32)

PipelineBuffer 열에 저장된 부동 소수점 수를 가져옵니다.

GetString(Int32)

버퍼 열에 저장된 문자열을 가져옵니다.

GetTime(Int32)

열에 저장된 PipelineBuffer TimeSpan 값을 가져옵니다.

GetUInt16(Int32)

버퍼 열에 저장된 ushort 값을 가져옵니다.

GetUInt32(Int32)

버퍼 열에 저장된 UInt32 값을 가져옵니다.

GetUInt64(Int32)

버퍼 열에 저장된 ulong 값을 가져옵니다.

IsNull(Int32)

버퍼 열의 데이터가 Null인지 확인합니다.

NextRow()

PipelineBuffer를 다음 행으로 이동합니다.

RemoveRow()

PipelineBuffer에서 현재 행을 제거합니다.

ResetBlobData(Int32)

지정한 BLOB 열의 내용을 삭제합니다.

SetBoolean(Int32, Boolean)

열에 부울 값을 PipelineBuffer 할당합니다.

SetByte(Int32, Byte)

열에 바이트를 할당합니다 PipelineBuffer .

SetBytes(Int32, Byte[])

바이트 배열을 버퍼 열에 할당합니다.

SetDate(Int32, DateTime)

열에 DateTime 값을 할당합니다 PipelineBuffer .

SetDateTime(Int32, DateTime)

열에 DateTime 값을 할당합니다 PipelineBuffer .

SetDateTimeOffset(Int32, DateTimeOffset)

DateTimeOffset 값을 열에 PipelineBuffer 할당합니다.

SetDecimal(Int32, Decimal)

버퍼 열에 10진수를 할당합니다.

SetDouble(Int32, Double)

열에 double을 할당합니다 PipelineBuffer .

SetEndOfRowset()

구성 요소가 버퍼에 행 추가를 완료했음을 PipelineBuffer에 알립니다.

SetErrorInfo(Int32, Int32, Int32)

현재 PipelineBuffer 행에 대한 오류 정보를 설정합니다.

SetGuid(Int32, Guid)

버퍼 열에 Guid를 할당합니다.

SetInt16(Int32, Int16)

부호 있는 16비트 정수를 버퍼 열에 할당합니다.

SetInt32(Int32, Int32)

부호 있는 32비트 정수를 버퍼 열에 할당합니다.

SetInt64(Int32, Int64)

부호 있는 64비트 정수를 버퍼 열에 할당합니다.

SetNull(Int32)

버퍼 열에 null을 할당합니다.

SetSByte(Int32, SByte)

부호 있는 8비트 정수를 버퍼 열에 할당합니다.

SetSingle(Int32, Single)

부동 소수점 수를 버퍼 열에 할당합니다.

SetString(Int32, String)

문자열을 버퍼 열에 할당합니다.

SetTime(Int32, TimeSpan)

열에 TimeSpan 값을 PipelineBuffer 할당합니다.

SetUInt16(Int32, UInt16)

부호 없는 16비트 정수를 버퍼 열에 할당합니다.

SetUInt32(Int32, UInt32)

부호 없는 32비트 정수를 버퍼 열에 할당합니다.

SetUInt64(Int32, UInt64)

부호 없는 64비트 정수를 버퍼 열에 할당합니다.

적용 대상