OnObject(Object: IEtlObject);
Object. ETL task object.
The OnObject method implements events to execute ETL task object.
Executing the example requires that the repository contains an ETL task with the ETL identifier, in which connectors to data provider and data consumer are set up. A link should be set up between the connectors.
Public Class MyClass: Object, IEtlExecutionCallback
Sub OnObject(Object: IEtlObject);
Begin
Debug.WriteLine("Object is executed: " + Object.Id);
End Sub OnObject;
Sub OnProgress(Progress: Integer);
Begin
Debug.WriteLine("Finished: " + Progress.ToString + "%");
End Sub OnProgress;
Sub OnSetResult(nTotalRec: Integer; nErrorRec: Integer);
Begin
Debug.WriteLine("Total records processed: " + nTotalRec.ToString);
Debug.WriteLine("Skipped records: " + 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 processed and skipped records is displayed.
See also: