IEtlExecutionCallback.OnObject

Syntax

OnObject(Object: IEtlObject);

Parameters

Object. ETL task object.

Description

The OnObject method implements events to execute ETL task object.

Fore Example

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

Public Class MyClass: Object, IEtlExecutionCallback
    
Sub OnObject(Object: IEtlObject);
    
Begin
        Debug.WriteLine(
"The object is executed: " + Object.Id);
    
End Sub OnObject;
 
    
Sub OnProgress(Progress: Integer);
    
Begin
        Debug.WriteLine(
"Executed: " + Progress.ToString + "%");
    
End Sub OnProgress;
    
    
Sub OnSetResult(nTotalRec: Integer; nErrorRec: Integer);
    
Begin
        Debug.WriteLine(
"Total records processed: " + nTotalRec.ToString);
        Debug.WriteLine(
"Records skipped: " + nErrorRec.ToString);
    
End Sub OnSetResult;

End Class MyClass;
 
Sub Main;
Var
    MB: IMetabase;
    Etltask: IEtlTask;
    C: MyClass;
Begin
    MB := MetabaseClass.Active;
    Etltask := MB.ItemById(
"ETL").Bind As IEtlTask;
    C := 
New MyClass.Create;
    Etltask.Execute(C);
End Sub Main;

On executing the example ETL task execution is started. Information about execution status and the current object is displayed in the development environment console. After finishing the task the number of records processed and skipped is displayed.

See also:

IEtlExecutionCallback