IEtlObject.Task

Syntax

Task: IEtlTask;

Description

The Task property returns the ETL task, in which an object is created.

Comments

The use of the property may result in memory leak.

To prevent memory leak:

Example

Executing this example requires that the repository contains an ETL task with the OBJ_ETL identifier.

Add links to the Metabase and ETL system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Etl: IEtlTask;
    EtlObj: IEtlObject;
    Count: Integer;
Begin
    MB := MetabaseClass.Active;
    
// Get ETL task
    Etl := MB.ItemById("OBJ_ETL").Edit As IEtlTask;
    EtlObj := Etl.Item(
0);
    
// Display the number of ETL task objects in the console
    Count := EtlObj.Task.Count;
    Debug.WriteLine(
"Number of ETL task objects: " + Count.ToString);
End Sub UserProc;

After executing the example the console displays the number of ETL task objects.

See also:

IEtlObject