ShowInfoBox: Boolean;
ShowInfoBox: boolean;
The ShowInfoBox property determines whether information window opens with ETL task execution result.
Available values:
True. Default. The window with execution result opens.
False. The window with execution result does not open.
Executing the example requires that the repository contains an ETL task with the ETL_TASK identifier. The ETL task contains a repository source, consumer and transformer between them.
Add links to the Metabase and ETL system assemblies.
// Event handler for setting ETL task execution result
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 UserProc;
Var
MB: IMetabase;
Etltask: IEtlTask;
C: MyClass;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get ETL task
Etltask := MB.ItemById("ETL_TASK").Edit As IEtlTask;
// Start ETL task
C := New MyClass.Create;
Etltask.Execute(C);
// Stop the task
Etltask.StopExecute;
// Information window with result does not open
Etltask.ShowInfoBox := False;
// Save changes
(Etltask As IMetabaseObject).Save
End Sub UserProc;
After executing the example the information window with ETL task execution result does not open.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Etl;
…
// Event handler for setting ETL task execution result
Public Class MyClass: Object, IEtlExecutionCallback
Public Sub OnSetResult(nTotalRec: Integer; nErrorRec: Integer);
Begin
System.Diagnostics.Debug.WriteLine("Total number of processed records: " + nTotalRec.ToString());
System.Diagnostics.Debug.WriteLine("Skipped records: " + nErrorRec.ToString());
End Sub OnSetResult;
Public Sub OnObject(Object: IEtlObject);
Begin
System.Diagnostics.Debug.WriteLine("Object is being executed: " + Object.Id);
End Sub OnObject;
Public Sub OnProgress(Progress: Integer);
Begin
System.Diagnostics.Debug.WriteLine("Executed: " + Progress.ToString() + "%");
End Sub OnProgress;
End Class MyClass;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Etltask: IEtlTask;
C: MyClass;
Begin
// Get repository
MB := Params.Metabase;
// Get ETL task
Etltask := MB.ItemById["ETL_TASK"].Edit() As IEtlTask;
// Start ETL task
C := New MyClass.Create();
Etltask.Execute(C);
// Stop task
Etltask.StopExecute();
// Information window with result does not open
Etltask.ShowInfoBox := False;
// Save changes
(Etltask As IMetabaseObject).Save();
End Sub;
See also: