IEtlPlainLinkFieldMapping.StartValue

Syntax

StartValue: Integer;

Description

The StartValue property determines initial value on autoincrement field fill.

Comments

The property is relevant if the IEtlPlainLinkFieldMapping.Type property is set to EtlPlainLinkFieldMapping.Increment.

To determine increment step on autoincrement field fill, use IEtlPlainLinkFieldMapping.Increment.

Example

Executing the example requires that the repository contains an ETL task with the TASK_ETL identifier. The ETL task contains:

Add links to the Etl, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    EtlObj: IMetabaseObject;
    EtlTask: IEtlTask;
    Links: IEtlPlainLinks;
    Link: IEtlPlainLink;
    Output: IEtlPlainOutput;
    Field: IEtlPlainField;
    FileMapp: IEtlPlainLinkFieldMapping;
Begin
    // Get repository
    MB := MetabaseClass.Active;
    // Get ETL task
    EtlObj := MB.ItemById("TASK_ETL").Edit;
    EtlTask := EtlObj As IEtlTask;
    // Get linking object
    Links := EtlTask.Links;
    Link := Links.Item(0);
    // Get data source output
    Output := Link.SourceObjectOutput;
    // Get output field
    Field := Output.Fields.Item(0);
    // Fill the field by means of link type - autoincrement
    FileMapp := Link.Link(Field);
    FileMapp.Type := EtlPlainLinkFieldMappingType.Increment;
    // Set initial value
    FileMapp.StartValue := 100;
    // Set step
    FileMapp.Increment := 10;
    // Save changes
    EtlObj.Save;
End Sub UserProc;

After executing the example the specified input field is set a link type - autoincrement with set values.

See also:

IEtlPlainLinkFieldMapping