EventsAssembly: IMetabaseObjectDescriptor;
The EventsAssembly property determines the repository object used for event handling.
To use this property, determine event handler class via the IEtlTask.EventsClass property.
Event handlers for ETL task can be Fore objects.
Executing the example requires that the repository contains:
An ETL task with the ETL_TASK identifier.
A Fore object with the IETLTASKEXECUTIONEVENTS identifier, in which the EventsClass class is described.
Add links to the Metabase and ETL system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Etltask: IEtlTask;
Object: IMetabaseObjectDescriptor;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get ETL task
Etltask := MB.ItemById("ETL_TASK").Edit As IEtlTask;
// Get and set event handle unit
Object := MB.ItemById("IEtlTaskExecutionEvents") As IMetabaseObjectDescriptor;
Etltask.EventsAssembly := Object;
Etltask.EventsClass := "EventsClass";
// Save changes
(Etltask As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the specified ETL task uses event handler.
See also: