ParallelDataPumpTask Object

DTS Programming

DTS Programming

ParallelDataPumpTask Object

The ParallelDataPumpTask object copies and transforms data from source to destination rowsets. It performs the same functions as the DataPumpTask2 and DataDrivenQueryTask2, except that it will also copy and transform hierarchical rowsets. The FastLoad option of the DataPumpTask2 is not supported, however.

In the ParallelDataPumpTask object, a TransformationSets collection is populated with one or more TransformationSet objects, each of which includes a Transformations collection and contains all the information necessary to transform a component rowset of the source hierarchical rowset to the corresponding component rowset in the destination.

The component rowsets are scanned and matched source to destination through recursive descent. The columns of the parent rowset are in column-ordinal order. When a child rowset column is encountered, it is scanned before the remaining columns of the parent. Child rowsets are similarly processed; their own children are scanned when encountered, before their remaining rows, with greater column ordinal.

Using Transformation Modes

The ParallelDataPumpTask operates in one of the following modes:

  • In flattened mode, the component rowsets are copied without regard to the chapter values. All the rows of each child rowset are copied, including those not referenced by any chapters.

  • In hierarchical mode, rowsets are copied a row at a time. The rows of a child rowset referenced by the chapter in the parent rowset row are copied. Thus, child rowset rows can be copied multiple times, or not at all.

  • In data driven query mode, rowsets are processed in the same way as in flattened mode, except that one of four queries, typically an INSERT, UPDATE or DELETE SQL statement, or stored procedure, can be executed based on the return code of a script transform.

The mode is specified with the TransformationSetOptions property of the TransformationSet object.

Collections
Properties Collection TransformationSets Collection

Properties
Description Property Name Property
DestinationCommandProperties Property SourceCommandProperties Property
DestinationConnectionID Property SourceConnectionID Property
DestinationObjectName Property SourceObjectName Property
DestinationSQLStatement Property SourceSQLStatement Property
InputGlobalVariableNames Property  

Methods
Execute Method

Remarks

A failure of any TransformationSet (including failure due to the maximum number of error rows being exceeded for that TransformationSet, regardless of the error counts in other TransformationSets) results in the failure of the ParallelDataPumpTask.

In Microsoft® SQL Server™ 2000, the ParallelDataPumpTask is available only through the Data Transformation Services (DTS) object model. It cannot be accessed through DTS Designer or the DTS Import/Export Wizard.

Examples
Parallel Data Driven Query Example Parallel Data Pump Example

See Also

Hierarchical Rowsets

TransformationSet Object