IEtlPlainFields.Add

Syntax

Add: IEtlPlainField;

Description

The Add method adds a new input or output field of ETL task object.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Object: IMetabaseObject;
    EtlTask: IEtlTask;
    Join: IEtlPlainDataJoin;
    Input: IEtlPlainInput;
    Fields: IEtlPlainFields;
    Field: IEtlPlainField;
Begin
    MB := MetabaseClass.Active;
    Object := MB.ItemById("ETL").Edit;
    EtlTask := Object As IEtlTask;
    Join := EtlTask.Item(0As IEtlPlainDataJoin;
    Input := Join.PlainInputs.Item(0);
    Fields := Input.Fields;
    Field := Fields.Add;
    Object.Save;
End Sub UserProc;

After executing the example the Field variable contains a new field of the first input of ETL task object. The type of ETL task object is Join. The repository object has the ETL identifier.

See also:

IEtlPlainFields