OnObject(Object: IEtlObject);
Object. ETL task object.
The OnObject method implements events to execute ETL task object.
Executing this example requires an ETL task with the Etl identifier in a repository.
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 development environment console. After finishing the task the number of records processed and skipped is displayed.
See also: