IDTSDataPumpTransform2 Interface

DTS Programming

DTS Programming

IDTSDataPumpTransform2 Interface

All Data Transformation Services (DTS) custom transformations that are to be used with Microsoft® SQL Server™ 2000 must implement the IDTSDataPumpTransform2 interface. Although IDTSDataPumpTransform2 inherits and implements all the elements of IDTSDataPumpTransform, the transformation must still respond to QueryInterface for IDTSDataPumpTransform as well as for IDTSDataPumpTransform2

The IDTSDataPumpTransform2 interface has the following elements, in addition to those implemented by IDTSDataPumpTransform.

Element Description
GetTransformServerInfo method Returns supported phases and other information about the transformation.
PreValidateSchema method Validates the schemas that are to be transformed at the time a custom transformation is created.
SetExtendedInfo method Reserved for future use.
ProcessPhase method Executes a phase of the custom transformation for a single source row.
SetExecuteThreadComplete method Performs post-processing on a thread prior to executing on another thread.

As required by COM, all these methods must be present, but they can be placeholders returning NOERROR.

GetTransformServerInfo Method

GetTransformServerInfo returns a bitmask that defines the phases supported by the custom transformation. It returns a help string that can be displayed in a user interface to explain the function of the custom transformation.

Note  The ProcessPhase method is not called for a phase specified by GetTransformServerInfo unless the value specified for the TransformPhases property of the Transformation2 object also specifies the phase. For DTS packages built in DTS Designer, specify phases on the Phases tab of the Transformation Options dialog box.

PreValidateSchema Method

PreValidateSchema is used to provide validation at the time a package is built. It is called from DTS Designer when the custom transformation is created or edited. It can perform part or all of the validation on the source and destination column meta data that IDTSDataPumpTransform::ValidateSchema performs. However, there are limitations that may justify deferring some complex validations to ValidateSchema. For more information, see DTS Custom Transformation Example: Format Names.

SetExtendedInfo Method

SetExtendedInfo is reserved for future use. Implement it as a placeholder that returns NOERROR.

ProcessPhase Method

ProcessPhase is called to perform each phase of the custom transformation. It is responsible for transforming the source column data to the destination columns. It writes any header or trailer rows that are necessary. It handles transformation, insert operations, data driven queries, and batch errors. For more information, see IDTSDataPumpTransform2::ProcessPhase.

SetExecuteThreadComplete Method

SetExecuteThreadComplete is called when the data pump is to switch execution threads. The custom transformation closes any thread-affinitive processes and prepares to reopen them on the new thread.

See Also

IDTSDataPumpTransform::ValidateSchema

IDTSDataPumpTransform2::PreValidateSchema

IDTSDataPumpTransform2::GetTransformServerInfo

IDTSDataPumpTransform2::SetExecuteThreadComplete

IDTSDataPumpTransform2::SetExtendedInfo

TransformPhases Property