IEtlPlainLinkFieldMapping.Field

Syntax

Field: IEtlPlainField;

Description

The Field property determines a data provider field if type of the link between fields of data consumer and data provider is Field.

Example

Sub UserProc;
Var
    MB: IMetabase;
    Object: IMetabaseObject;
    EtlTask: IEtlTask;
    Links: IEtlPlainLinks;
    Link: IEtlPlainLink;
    Output: IEtlPlainOutput;
    Input: IEtlPlainInput;
    Field: IEtlPlainField;
    FieMapp: IEtlPlainLinkFieldMapping;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    Object := MB.ItemById("ETL").Edit;
    EtlTask := Object As IEtlTask;
    Link := EtlTask.Links.Item(0);
    Input := Link.DestinationObjectInput;
    Output := Link.SourceObjectOutput;
    For i := 0 To Input.Fields.Count-1 Do
        Field := Input.Fields.Item(i);
        FieMapp := Link.Link(Field);
        FieMapp.Type := 0 As EtlPlainLinkFieldMappingType;
        FieMapp.Field := Output.Fields.Item(Input.Fields.Count-i-1);
    End For;
    Object.Save;
End Sub UserProc;

After executing the example inverse link is set between fields of data provider output and data consumer input, that is, the first data consumer field is set into correspondence with the last data provider field, the second data consumer field with the next to last data provider field, and so on.

See also:

IEtlPlainLinkFieldMapping