ExecuteTask(ExecCallback: IEtlExecutionCallback);
ExecuteTask(ExecCallback: Prognoz.Platform.Interop.Etl.IEtlExecutionCallback);
ExecCallback. Object that is used to monitor ETL task process execution.
The ExecuteTask method starts ETL task execution.
As the ExecCallback parameter value, specify the custom class instance that is implemented by the IEtlExecutionCallback interface.
Executing the example requires a form with a button named Button1, the UiEtlObject component named UiEtlObject1 and the EtlBox component named EtlBox1. UiEtlObject1 is selected as a data source for EtlBox1. Any ETL task is connected to UiEtlObject1.
Class SAMPLEForm: Form
UiEtlObject1: UiEtlObject;
EtlBox1: EtlBox;
Button1: Button;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
C: EtlCallback;
Begin
C := New EtlCallback.Create;
EtlBox1.ExecuteTask(C);
End Sub Button1OnClick;
End Class SAMPLEForm;
Public Class EtlCallback: 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 EtlCallback;
Clicking the button starts execution of the ETL task, which is displayed in the EtlBox1 component. All information about task execution status will be displayed in the development environment console.
See also: