Remove;
Remove();
The Remove method removes ETL task object.
Any ETL task object has two linked components:
The IEtlObject object.
The IWxShape visual representation.
To remove an ETL task object, first of all, remove its visual representation.
Executing the example requires that the repository contains an ETL task with the ETL_TASK identifier containing at least one object.
Add links to the Andy, Etl, Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MbObj: IMetabaseObject;
EtlTask: IEtlTask;
Shape: IWxShape;
EtlObj: IEtlObject;
Begin
MB := MetabaseClass.Active;
MbObj := MB.ItemById("ETL_TASK").Edit;
EtlTask := MbObj As IEtlTask;
Shape := EtlTask.Workspace.Shapes.Item(0);
Shape.Delete;
EtlObj := EtlTask.Item(0);
EtlObj.Remove;
MbObj.Save;
End Sub UserProc;
Executing the example removes an ETL task object with the 0 index.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Etl;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
MbObj: IMetabaseObject;
EtlTask: IEtlTask;
Shape: IWxShape;
EtlObj: IEtlObject;
Begin
MB := Params.Metabase;
MbObj := MB.ItemById["ETL_TASK"].Edit();
EtlTask := MbObj As IEtlTask;
Shape := EtlTask.Workspace.Shapes.Item[0];
Shape.Delete();
EtlObj := EtlTask.Item[0];
EtlObj.Remove();
MbObj.Save();
End Sub;
See also: