IEtlPlainLinkFieldMapping.Type

Fore Syntax

Type: EtlPlainLinkFieldMappingType;

Fore.NET Syntax

Type: Prognoz.Platform.Interop.Etl.EtlPlainLinkFieldMappingType;

Description

The Type property determines link type of data source field of ETL task.

Comments

To determine a data source field, use the IEtlPlainLinkFieldMapping.Field property.

Fore Example

Executing the example requires an ETL task with the ETL identifier.

Add links to the Etl and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    EtlTask: IEtlTask;
    Links: IEtlPlainLinks;
    Link: IEtlPlainLink;
    Output: IEtlPlainOutput;
    FileMapp: IEtlPlainLinkFieldMapping;
    Type: Integer;
    Field: IEtlPlainField;
Begin
    MB := MetabaseClass.Active;
    EtlTask := MB.ItemById("ETL").Bind As IEtlTask;
    // Get link between data source and data consumer
    Links := EtlTask.Links;
    Link := Links.Item(0);
    // Get output field
    Output := Link.SourceObjectOutput;
    Field := Output.Fields.Item(0);
    FileMapp := Link.Link(Field);
    // Get link type of data source field
    Type := FileMapp.Type;
    Debug.WriteLine("Link type: " + Type.ToString);
End Sub UserProc;

After executing the example the console window displays a message about link type of data source field of ETL task.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Etl;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    EtlTask: IEtlTask;
    Links: IEtlPlainLinks;
    Link: IEtlPlainLink;
    Output: IEtlPlainOutput;
    FileMapp: IEtlPlainLinkFieldMapping;
    Type: Integer;
    Field: IEtlPlainField;
Begin
    MB := Params.Metabase;
    EtlTask := MB.ItemById["ETL"].Bind() As IEtlTask;
    // Get link between data source and data consumer
    Links := EtlTask.Links;
    Link := Links.Item[0];
    // Get output field
    Output := Link.SourceObjectOutput;
    Field := Output.Fields.Item[0];
    FileMapp := Link.Link[Field];
    // Get link type of data source field
    Type := FileMapp.Type As Int32;
    System.Diagnostics.Debug.WriteLine("Link type: " + Type.ToString());
End Sub;

See also:

IEtlPlainLinkFieldMapping