共用方式為


PipelineComponent Class

Definition

Defines the base class that is used when developing managed data flow components.

public ref class PipelineComponent
public class PipelineComponent
type PipelineComponent = class
Public Class PipelineComponent
Inheritance
PipelineComponent
Derived

Examples

The following code example shows a component that implements the DtsPipelineComponentAttribute and inherits from the PipelineComponent class.

using System;  
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;  
namespace Microsoft.Samples.SqlServer.Dts  
{  
    [DtsPipelineComponent(DisplayName="SampleComponent")]  
    public class SampleComponent : PipelineComponent  
    {  
        public override ProvideComponentProperties()  
        {  
            // TODO: Implement component intialization.  
        }  
        public override DTSValidationStatus Validate()  
        {  
            // TODO: Implement component validation.  
        }  
        public override void ProcessInput( int inputID, PipelineBuffer buffer)  
        {  
            // TODO: For transformation and destination components,  
            //  implement code to process incoming rows.  
        }  
    }  
}  
Imports System   
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper   
Namespace Microsoft.Samples.SqlServer.Dts   

 <DtsPipelineComponent(DisplayName="SampleComponent")> _   
 Public Class SampleComponent   
 Inherits PipelineComponent   

   Public Overrides Sub ProvideComponentProperties()   
    ' TODO: Implement component intialization.  
   End Sub   

   Public Overrides Function Validate() As DTSValidationStatus   
    ' TODO: Implement component validation.  
   End Function   

   Public Overrides Sub ProcessInput(ByVal inputID As Integer, ByVal buffer As PipelineBuffer)   
    ' TODO: For transformation and destination components,  
    '  implement code to process incoming rows.  
   End Sub   
 End Class   
End Namespace  

Remarks

Inherit from this class to create your own data flow component. This class implements the required component interfaces, IDTSDesigntimeComponent100 and IDTSRuntimeComponent100. You override the base class implementation of these methods to provide the functionality of your component. PipelineComponent provides helper methods in addition to the methods of the component interfaces to help you in developing your component.

Constructors

PipelineComponent()

Initializes a new instance of the PipelineComponent class.

Fields

s_STOCKPROPNAME_COMPFLAGS

Contains the name of the ComparisonFlags property of data flow components.

s_STOCKPROPNAME_DELOUTPUTONPATHDETACHED

Contains the name of the DeleteOutputOnPathDetached property of data flow components.

s_STOCKPROPNAME_EXCLGROUP

Contains the name of the ExclusionGroup property of data flow components.

s_STOCKPROPNAME_HASSIDEEFFECTS

Contains the name of the HasSideEffects property of data flow components.

s_STOCKPROPNAME_ISDISTRIBUTABLE

Contains the name of the IsDistributable property of data flow components.

s_STOCKPROPNAME_ISERROROUT

Contains the name of the IsErrorOut property of data flow components.

s_STOCKPROPNAME_ISSORTED

Contains the name of the IsSorted property of data flow components.

s_STOCKPROPNAME_REFMETADATAID

Contains the name of the ReferenceMetaDataID property of data flow components.

s_STOCKPROPNAME_SORTKEYPOS

Contains the name of the SortKeyPosition property of data flow components.

s_STOCKPROPNAME_SYNCINPUTID

Contains the name of the SynchronousInputID property of data flow components.

Properties

BufferManager

Gets the IDTSBufferManager100 of the pipeline component.

ComponentMetaData

Gets the IDTSComponentMetaData100 for a component.

ErrorSupport

Returns an ErrorSupport object that lets the component raise errors, warnings, or other information events based on HRESULTs returned by Integration Services components written in native code.

EventInfos

Gets the IDTSEventInfos100 collection of the PipelineComponent object.

LogEntryInfos

Gets an IDTSLogEntryInfos100 collection of logging events that the component has registered.

ReferenceTracker

Gets the IDTSObjectReferenceTracker100 associated with the component.

VariableDispenser

Gets the IDTSVariableDispenser100 of the data flow component.

Methods

AcquireConnections(Object)

Establishes a connection to a connection manager.

AddErrorOutput(String, Int32, Int32)

Adds an IDTSOutput100 object and marks it as an error output by setting the IsErrorOut property to true.

BufferTypeToDataRecordType(DataType)

Returns a managed data type based on an Integration Services data type.

Cleanup()

Frees resources and finishes the execution of the component.

ConvertBufferDataTypeToFitManaged(DataType, Boolean)

Gets the appropriate Integration Services DataType from managed code.

DataRecordTypeToBufferType(Type)

Gets the Integration Services DataType that corresponds to a managed type.

DeleteExternalMetadataColumn(Int32, Int32)

Deletes the external metadata column at the specified index from the collection of external metadata columns.

DeleteInput(Int32)

Deletes an IDTSInput100 object from the IDTSInputCollection100 collection.

DeleteOutput(Int32)

Deletes an IDTSOutput100 object from the IDTSOutputCollection100 collection.

DeleteOutputColumn(Int32, Int32)

Deletes an IDTSOutputColumn100 object from the IDTSOutputColumnCollection100 collection.

DescribeRedirectedErrorCode(Int32)

Provides error code information for a PipelineBuffer row added to an output buffer.

GetDependentInputs(Int32)

Returns a collection of the input IDs of inputs that are waiting for more data, and thus are blocking the specified input.

GetErrorOutputInfo(Int32, Int32)

Returns the index and ID of the error output of the component.

idxOfBufferType(DataType)

Specifies the type of the buffer index.

idxOfDataRecordType(Type)

Specifies the type of the data record index.

Initialize()

When overridden in a derived class, initializes a new instance of a custom data flow component.

InsertExternalMetadataColumnAt(Int32, Int32, String, String)

Inserts a new external metadata column into the collection of external metadata columns at the specified index.

InsertInput(DTSInsertPlacement, Int32)

Adds an IDTSInput100 object to the IDTSInputCollection100.

InsertOutput(DTSInsertPlacement, Int32)

Adds a new IDTSOutput100 object

InsertOutputColumnAt(Int32, Int32, String, String)

Creates a new IDTSOutputColumn100 object and inserts it into the IDTSOutputColumnCollection100.

IsCompatibleNumericTypes(DataType, DataType)

Determines whether two numeric data types are compatible to support a conversion from one type to the other.

IsInputReady(Int32[], Boolean[])

Determines which of the inputs attached to a component are waiting for more data, and which have enough data to process and are blocked.

MapInputColumn(Int32, Int32, Int32)

Establishes a relationship between an input column and a corresponding external metadata column.

MapOutputColumn(Int32, Int32, Int32, Boolean)

Establishes a relationship between an output column and a corresponding external metadata column.

OnDeletingInputColumn(Int32, Int32)

Deletes an IDTSInputColumn100 object from the IDTSInputColumnCollection100.

OnInputPathAttached(Int32)

Called when an IDTSInput100 object is connected to the component through the IDTSPath100 interface.

OnInputPathDetached(Int32)

Called when an IDTSInput100 object is disconnected from the component through the IDTSPath100 interface.

OnOutputPathAttached(Int32)

Called when an IDTSOutput100 object of the component is attached to a downstream component.

PerformDowngrade(Int32, DTSTargetServerVersion)

By default PerformDowngrade should not throw ComponentDowngradeFailedException because runtime can only determine whether to call this method by targetServerVersion; it cannot check component version because it doesn't know whether the component version has been changed between two SSIS versions, while the method PerformUpgrade will check if the component version in package xml is smaller than current component version before being called.

PerformUpgrade(Int32)

Upgrades the component metadata to the version of the component installed on the local computer.

PostExecute()

Called at the end of component execution, but before Cleanup().

PreExecute()

Called after PrepareForExecute(), and before PrimeOutput(Int32, Int32[], PipelineBuffer[]) and ProcessInput(Int32, PipelineBuffer).

PrepareForExecute()

Called before PreExecute().

PrimeOutput(Int32, Int32[], PipelineBuffer[])

Called at run time for source components and transformation components with asynchronous outputs to let these components add rows to the output buffers.

ProcessInput(Int32, PipelineBuffer)

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

ProvideComponentProperties()

Called when a component is first added to the data flow task, to initialize the ComponentMetaData of the component.

RegisterEvents()

When you are developing a custom data flow component, you override this method to create custom events.

RegisterLogEntries()

Registers the events that the component will log.

ReinitializeMetaData()

Repairs any errors identified during validation that cause the component to return VS_NEEDSNEWMETADATA at design time.

ReleaseConnections()

Frees the connections established during AcquireConnections(Object). Called at design time and run time.

RemoveAllInputsOutputsAndCustomProperties()

Deletes each IDTSInput100 and IDTSOutput100 object from the component.

SetComponentProperty(String, Object)

Assigns a value to a IDTSCustomProperty100 of the component.

SetExternalMetadataColumnDataTypeProperties(Int32, Int32, DataType, Int32, Int32, Int32, Int32)

Sets the data type properties of the specified external metadata column.

SetExternalMetadataColumnProperty(Int32, Int32, String, Object)

Sets an individual property of an external metadata column.

SetInputColumnProperty(Int32, Int32, String, Object)

Assigns a value to the IDTSCustomProperty100 of an IDTSInputColumn100 object.

SetInputProperty(Int32, String, Object)

Assigns a value to the IDTSCustomProperty100 of an IDTSInput100 object.

SetOutputColumnDataTypeProperties(Int32, Int32, DataType, Int32, Int32, Int32, Int32)

Sets the data type properties of an IDTSOutputColumn100 object.

SetOutputColumnProperty(Int32, Int32, String, Object)

Sets the value of an IDTSCustomProperty100 for an IDTSOutputColumn100 object.

SetOutputProperty(Int32, String, Object)

Sets the value of an IDTSCustomProperty100 on an IDTSOutput100 object.

SetUsageType(Int32, IDTSVirtualInput100, Int32, DTSUsageType)

Creates an IDTSInputColumn100 object in the IDTSInputColumnCollection100 of the component and sets the UsageType property of the column.

Validate()

Verifies that the component is correctly configured.

Applies to