IEtlPlainDataProvider.PlainOutput

Syntax

PlainOutput: IEtlPlainOutput;

Description

The PlainOutput property determines an output fields list.

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;

Tab: IDatasetModel;

Fields : IEtlPlainFields;

Field : IEtlPlainField;

Begin

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.Dataset := Tab;

 

Fields := EtlProvider.PlainOutput.Fields;

Fields := Fields.Edit;

 

Field := Fields.Add;

Field.Id := "Name";

Field.Name := "Name";

Field.DataType := DbDataType.String;

 

Field := Fields.Add;

Field.Id := "Id";

Field.Name := "Id";

Field.DataType := DbDataType.Integer;

 

Fields.Save;

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 with two fields on output is created for ETL task.

See also:

IEtlPlainDataProvider