IEtlPlainFields.Remove

Syntax

Remove(Index: Integer): Boolean;

Parameters

Index is a field index.

Description

The Remove method removes a field from an input or output list of ETL task object.

Example

Sub Main;

Var

MB: IMetabase;

Object: IMetabaseObject;

EtlTask: IEtlTask;

Join: IEtlPlainDataJoin;

Input: IEtlPlainInput;

Fields: IEtlPlainFields;

Field: IEtlPlainField;

s: string;

Begin

MB:=MetabaseClass.Active;

Object:=MB.ItemById("ETL").Edit;

EtlTask:=Object As IEtlTask;

Join:=EtlTask.Item(0) As IEtlPlainDataJoin;

Input:=Join.PlainInputs.Item(0);

Fields:=Input.Fields;

If Fields.Remove(Fields.Count-1) Then

s:="Removed";

Else

s:="Don't Removed";

End If;

Object.Save;

End Sub Main;

After executing this example the "s" variable contains "Removed" if removal of the last field of the first input of ETL task object is successful. Type of ETL task object is Join. Repository object has the ETL identifier.

See also:

IEtlPlainFields