Show contents 

ETL > ETL Assembly Interfaces > IEtlPlainField > IEtlPlainField.Precision

IEtlPlainField.Precision

Syntax

Precision: Integer;

Description

The Precision property determines the precision of the data provider/data consumer field. Precision is a number of signs after comma. The property is relevant for real data type only.

Example

The example supposes that there is an ETL task with the OleDb data consumer with the OLE_Consumer identifier in the field.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    EtlTask: IEtlTask;
    EtlConsumer: IEtlPlainDataConsumer;
    Fields: IEtlPlainFields;
    Field: IEtlPlainField;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("ETL").Edit;
    EtlTask := MObj As IEtlTask;
    EtlConsumer := EtlTask.FindById("OLE_CONSUMER"As IEtlPlainDataConsumer;
    EtlConsumer := EtlConsumer.Edit;
    Fields := EtlConsumer.PlainInput.Fields;
    Field := Fields.Add;
    Field.Name := "F_Float";
    Field.DataType := DbDataType.Float;
    Field.Size := 20;
    Field.Precision := 8;
    Field := Fields.Add;
    Field.Name := "F_String";
    Field.DataType := DbDataType.String;
    Field.Size := 200;
    EtlConsumer.Save;
    MObj.Save;
End Sub UserProc;

After executing the example input fields are added for the OleDB data consumer.

See also:

IEtlPlainField