StartValue: Integer;
The StartValue property determines initial value on autoincrement field fill.
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.
Executing the example requires that the repository contains an ETL task with the TASK_ETL identifier. The ETL task contains:
A repository source, which data source is a table containing an integer-type field. The field must contain several values.
A repository consumer, which data source is a table containing an integer-type field.
An unconfigured link between repository data source output and data consumer input.
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: