IEtlObject.GetControlledObjects

Syntax

GetControlledObjects: IMetabaseObjectDescriptors;

Description

The GetControlledObjects method returns the collection of descriptions of repository objects controlled by the current ETL task object.

Example

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

Add links to the Etl, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Etl: IEtlTask;
    EtlObj: IEtlObject;
    Controlled: IMetabaseObjectDescriptors;
    MDesc: IMetabaseObjectDescriptor;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    
// ETL task
    Etl := MB.ItemById("ETL_TASK").Edit As IEtlTask;
    
For i := 0 To Etl.Count - 1 Do
        
// ETL task object
        EtlObj := Etl.Item(i);
        
// Controlled objects
        Controlled := EtlObj.GetControlledObjects;
        
If Controlled.Count > 0 Then
            Debug.WriteLine(
"ETL task object: " + EtlObj.Name + ". Controlled objects:");
            Debug.Indent;
            
For Each MDesc In Controlled Do
                Debug.WriteLine(MDesc.Name + 
'(' + MDesc.Id + ')');
            
End For;
            Debug.Unindent;
        
End If;
    
End For;
End Sub UserProc;

On executing the example ETL task objects are searched. If any ETL task object controls repository objects, these objects are displayed in the development environment console.

See also:

IEtlObject