ShowConsumerData Command

Purpose

It opens a dialog box that is used to view ETL task consumer data.

Parameters of Use

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.

Application Features

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.

Example

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.

See also:

IUiCommandTarget.Execute | ETL Task Data Consumers