Remove(Index: Integer): Boolean;
Index - field index.
The Remove method removes a field from an input or output list of ETL task object.
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 the example the "s" variable contains "Removed" if removal of the last field of the first input of ETL task object is successful. The type of ETL task object is Join. The repository object has the ETL identifier.
See also: