Precision: Integer;
The Precision property determines the precision of the provider/consumer field. Precision is a number of signs after comma. The property is relevant for real data type only.
The example supposes that there is an ETL task with the OleDb 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 consumer.
See also: