IWxEtlObject.EtlObject

Syntax

EtlObject: Object;

Description

The EtlObject property determines ETL task object that has a corresponding graphic object.

Example

Sub UserProc;
Var
    MB: IMetabase;
    MbObj: IMetabaseObject;
    EtlTask: IEtlTask;
    EtlProvider: IEtlPlainDataProvider;
    ExcelProvider: IDtExcelProvider;
    WxConsumer: IWxRectangle;
    WxETLConsumer: IWxEtlObject;
Begin
    MB := MetabaseClass.Active;
    //Search for ETL task . Repository object with the ETL identifier
    MbObj := MB.ItemById("ETL").Edit;
    EtlTask := MbObj As IEtlTask;
    //Start of creating an Excel provider
    //Create the "Import from Excel" object
    EtlProvider := EtlTask.Create(EtlObjectType.PlainDataExcelProvider) As IEtlPlainDataProvider;
    EtlProvider := EtlProvider.Edit;
    EtlProvider.Id := "File_XLS";
    EtlProvider.Name := "XLS data provider";
    EtlProvider.Description := "Data from the data.xls file";
    //Set up data provider
    ExcelProvider := EtlProvider.Provider As IDtExcelProvider;
    ExcelProvider.File := "c:\data.xls" ;
    ExcelProvider.DriverVersion := "Excel 8.0";
    ExcelProvider.Query := "select * from [Sheet1$]";
    ExcelProvider.HasHeader := False;
    EtlProvider.FillDefault;
    //Save Excel source
    EtlProvider.Save;
    //End of creating an Excel provider
    //Start of creating a visual object
    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(5050);
    WxConsumer.Extension := WxETLConsumer As IWxShapeExtension;
    //Ending of visual object creation
    //Save repository object
    MbObj.Save;
End Sub UserProc;

After executing the example, the Import from Excel object with the FILE_XLS identifier is created in the ETL task, data is taken from the file c:\data.xls. After creating the object, a graphic object is created to display the object on the ETL task workspace.

See also:

IWxEtlObject