Show contents 

ETL > ETL Assembly Interfaces > IEtlPlainField > IEtlPlainField.Size

IEtlPlainField.Size

Syntax

Size: Integer;

Description

The Size property determines the size of the data provider/data consumer field. Size is a field general length.

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