IEtlPlainDataProvider.Provider

Syntax

Provider: IDtProvider;

Description

The Provider property returns import or export object.

Example

Executing the example requires that the repository contains an ETL task with the ETL identifier and a table with the Table identifier. This table represents data source.

Sub UserProc;

Var

Metabase : IMetabase;

MObj: IMetabaseObject;

EtlTask: IEtlTask;

EtlProvider: IEtlPlainDataProvider;

MBProvider: IDtMetabaseProvider;

i, j : integer;

Tab: IDatasetModel;

Begin

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

Metabase := MetabaseClass.Active;

MObj := Metabase.ItemById("ETL").Edit;

EtlTask := MObj As IEtlTask;

Tab := Metabase.ItemById("Table").Bind As IDatasetModel;

//Create an object Repository Source

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

EtlProvider := EtlProvider.Edit;

EtlProvider.Id := "MB_Provider";

EtlProvider.Name := "Repository data source";

//Configuration of data source

MBProvider := EtlProvider.Provider As IDtMetabaseProvider;

MBProvider.FieldsFromFile;

MBProvider.Dataset := Tab;

EtlProvider.FillDefault;

EtlProvider.Save;

//Creation of visual object

CreateWX(EtlProvider, EtlTask);

MObj.Save;

End Sub UserProc;

 

Sub CreateWX(CopyObj: IEtlPlainDataProvider ; Etltask: IEtltask);

Var

WxDataTrans : IWxRectangle;

WxETLDataTrans : IWxEtlObject;

Begin

WxDataTrans := EtlTask.Workspace.CreateRectangle;

WxDataTrans.Id := CopyObj.Id;

WxETLDataTrans := New WxEtlObject.Create;

WxETLDataTrans.EtlObject := CopyObj;

WxDataTrans.Style.TextPosition := WxTextPosition.Bottom;

WxDataTrans.Style.PictureMarginTop := -10;

WxDataTrans.PinPosition := New GxPointF.Create(20, 20);

WxDataTrans.Extension := WxETLDataTrans As IWxShapeExtension;

End Sub CreateWX;

After executing the example (UserProc) repository data source is created for ETL task, input fields are identical to fields of specified source (Table).

See also:

IEtlPlainDataProvider