ShowProviderData Command

Purpose

It opens a dialog box that is used view data in an ETL task source.

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
IDtProvider The data source, which data needs to be viewed.

Application Features

The command can be used only for the data source that is implemented by the IDtProvider interface. When working with an ETL task, data source parameters can be obtained in the IEtlPlainDataProvider.Provider property. A data source can also be created dynamically by means of classes of the Dt assembly.

Fore Example

Executing the example requires that the repository contains an ETL task with the ETL identifier. A data provider with the METABASEPROVIDER 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("METABASEPROVIDER"As IEtlPlainDataProvider).Provider;
    CommandTarget.Execute("ShowProviderData", Context);
End Sub UserProc;

After executing the example the data existing in the specified ETL task data source is displayed.

Fore.NET Example

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("METABASEPROVIDER"As IEtlPlainDataProvider).Provider;
    CommandTarget.Execute("ShowProviderData", Context, Null);
End Sub;

See also:

IUiCommandTarget.Execute | ETL Task Providers