It opens a dialog box that is used to view ETL task consumer data.
Command parameters are passed in the Data property. Executing the command requires to specify the following value in this property:
Value type | Description |
IDtConsumer | The consumer, which data must be viewed. |
The command can be used only for the data consumer that is implemented by the IDtConsumer interface. When working with an ETL task, data consumer parameters can be obtained in the IEtlPlainDataConsumer.Consumer property. A data consumer can also be created dynamically by means of classes of the Dt assembly.
Executing the example requires that the repository contains an ETL task with the ETL identifier. A data consumer with the METABASECONSUMER identifier is created in the task. Add links to the ETL, Metabase and Ui system assemblies.
Sub UserProc;
Var
MB: IMetabase;
ETL: IEtlTask;
CommandTarget: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := MetabaseClass.Active;
ETL := MB.ItemById("ETL").Bind As IEtlTask;
CommandTarget := WinApplication.Instance.GetPluginTarget("Etl");
Context := CommandTarget.CreateExecutionContext;
Context.Data := (ETL.FindById("METABASECONSUMER") As IEtlPlainDataConsumer).Consumer;
CommandTarget.Execute("ShowConsumerData", Context);
End Sub UserProc;
After executing the example, the data existing in the specified ETL task data consumer is displayed.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Etl;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Ui;
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
ETL: IEtlTask;
WinApp: WinApplication = New WinApplicationClass_2();
CommandTarget: IUiCommandTarget;
Context: IUiCommandExecutionContext;
Begin
MB := Params.Metabase;
ETL := MB.ItemById["ETL"].Bind() As IEtlTask;
CommandTarget := WinApp.GetPluginTarget("Etl");
Context := CommandTarget.CreateExecutionContext();
Context.Data := (ETL.FindById("METABASECONSUMER") As IEtlPlainDataConsumer).Consumer;
CommandTarget.Execute("ShowConsumerData", Context, Null);
End Sub;
See also: