Export (0) Print
Expand All

ScriptComponent Class

Serves as the base class for the read-only UserComponent class generated by the Script component in the ComponentWrapper project item in a Script component project.

Object
  Microsoft.SqlServer.Dts.Pipeline.ScriptComponent

Namespace:  Microsoft.SqlServer.Dts.Pipeline
Assembly:  Microsoft.SqlServer.TxScript (in Microsoft.SqlServer.TxScript.dll)

public class ScriptComponent

The ScriptComponent type exposes the following members.

  NameDescription
Public methodScriptComponentInitializes a new instance of the ScriptComponent class.
Top

  NameDescription
Public propertyComponentMetaDataReturns a reference to the component definition.
Public propertyStatic memberEvaluatorContextGets the script component evaluator context.
Public propertyInputIDToNameMapGets the input identifier to name map.
Public propertyOutputNameMapGets the output name map.
Public propertyReadOnlyVariablesReturns the collection of ReadOnlyVariables available to the component.
Public propertyReadWriteVariablesReturns the collection of ReadWriteVariables available to the component.
Public propertyVariableDispenserReturns an object that the data flow uses internally to work with variables.
Top

  NameDescription
Public methodAcquireConnectionsObtains a connection or connection information by using a connection manager.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetColumnIndexesInfrastructure. Gets the collection of column index for the script component.
Public methodGetHashCode (Inherited from Object.)
Public methodStatic memberGetOutputIDReturns the output ID that has a specified output name.
Public methodGetType (Inherited from Object.)
Public methodLogWrites a log entry.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodPostExecuteExecutes custom code that must run after the Script component has processed its inputs and outputs.
Public methodPreExecuteExecutes custom code that must run before the Script component has processed its inputs and outputs.
Public methodPrimeOutputPrepares the outputs in Script components, such as sources and transformations with asynchronous outputs, that add new rows to the output buffers.
Public methodProcessInput(Int32, PipelineBuffer)Processes the inputs in Script components, such as transformations and destinations, that receive inputs from upstream components.
Public methodProcessInput(Int32, String, PipelineBuffer, OutputNameMap)Processes inputs in the script components.
Public methodReleaseConnectionsReleases a connection to a connection manager.
Public methodSetBufferColumnIndexesInfrastructure. Sets the index of the buffer columns.
Public methodToString (Inherited from Object.)
Top

The ScriptComponent class serves as the base class for the read-only UserComponent class, which is generated by the Script component in the ComponentWrapper project item in a Script component project. The UserComponent class serves as the base class for the ScriptMain class, in which the developer writes custom code, and provides the developer with a set of methods for working with the component's inputs and outputs. It also provides strongly-typed accessor properties for variables and connection managers available to the component.

The Script component developer does not use the ScriptComponent class directly, but indirectly, by coding the methods and properties of the ScriptMain class, which inherits from ScriptComponent through the UserComponent class.

For more information, see Coding and Debugging the Script Component and Understanding the Script Component Object Model.

The following code sample demonstrates all the code that a developer has to write to create a transformation with synchronous outputs by using the Script component. For more information on this sample, see Creating a Synchronous Transformation with the Script Component.

Public Class ScriptMain
    Inherits UserComponent

    Public Overrides Sub MyAddressInput_ProcessInputRow(ByVal Row As MyAddressInputBuffer)

        Row.City = UCase(Row.City)

    End Sub

End Class

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft