IDtMetabaseProvider.Dataset

Syntax

Dataset: IDatasetModel;

Description

The Dataset property determines repository relational object, with which this data provider is connected.

Example

Executing the example requires that the repository contains an ETL task with the Etl identifier and a table with the Table_1 identifier.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

EtlTask: IEtlTask;

EtlProvider: IEtlPlainDataProvider;

MBProvider: IDtMetabaseProvider;

WxConsumer: IWxRectangle;

WxETLConsumer: IWxETLObject;

Begin

MB := MetabaseClass.Active;

//ETL task search. Repository object with the ETL identifier

MObj := MB.ItemById("Etl").Edit;

EtlTask := MObj As IEtlTask;

//Start of the source creation

//The Repository Source object creation

EtlProvider := EtlTask.Create(EtlObjectType.PlainDataMetabaseProvider) As IEtlPlainDataProvider;

EtlProvider := EtlProvider.Edit;

EtlProvider.Id := "MB_Provider";

EtlProvider.Name := "Repository provider";

EtlProvider.Description := "Data from the table Table_1";

//Data source setting

MBProvider := EtlProvider.Provider As IDtMetabaseProvider;

MBProvider.Dataset := MB.ItemById("Table_1").Bind As IDatasetModel;

EtlProvider.FillDefault;

//Saving the source

EtlProvider.Save;

//End of source creation

//Start of visual object creation

WxConsumer := EtlTask.Workspace.CreateRectangle;

WxETLConsumer := New WxETLObject.Create;

WxETLConsumer.ETLObject := EtlProvider;

WxConsumer.Style.TextPosition := WxTextPosition.Bottom;

WxConsumer.Style.PictureMarginTop := -10;

WxConsumer.PinPosition := New GxPointF.Create(50, 50);

WxConsumer.Extension := WxETLConsumer As IWxShapeExtension;

//End of visual object creation

//Save Etl task

MObj.Save;

End Sub Main;

After executing this example the Repository Provider object is created in the ETL task. The source is connected with the Table_1 repository table.

See also:

IDtMetabaseProvider