IEtlPlainDataBulkConsumer.EventId

Syntax

EventId: String;

Description

The EventId property determines identifier of the event called on occurring ETL task execution error.

Comments

To determine the method of handling the errors that may occur on data loading, use the IEtlPlainDataBulkConsumer.ActionOnProblem property.

The list of custom events is created in the IMetabaseCustomExtender.Events collection.

Example

Executing the example requires that the repository contains an ETL task with the ETL identifier. A custom event with the CUSTOM_EVENT identifier is also added to the repository.

Add links to the Etl and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Etl: IEtlTask;
    Obj: IEtlObject;
    Data: IEtlPlainDataBulkConsumer;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Etl := MB.ItemById("ETL").Edit As IEtlTask;
    For i := 0 To Etl.Count - 1 Do
        Obj := Etl.Item(i);
        Data := Obj As IEtlPlainDataBulkConsumer;
        If (Obj Is IEtlPlainDataBulkConsumer) Then
            Data.ActionOnProblem := EtlActionOnProblem.DiscardInvalidRecords;
            Data.SaveInvalidRecs := True;
            Data.InvalidRecsFileName := "Errors";
            Data.CommitCount := 2000;
            Data.UseStopLimit := True;
            Data.StopLimit := 2;
            Data.EventId := "CUSTOM_EVENT";
        End If;
    End For;
    (Etl As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the same parameters are set for all data consumers supporting error handling of separate transaction execution:

See also:

IEtlPlainDataBulkConsumer