IDtDbaseProvider.Path

Syntax

Path: String;

Description

The Path property determines the path to directory with tables, from which data is imported.

Example

Executing the example requires that the repository contains an ETL task with the ETL identifier and the Base_1.Dbf database file in the root of the C disk.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    EtlTask: IEtlTask;
    EtlProvider: IEtlPlainDataProvider;
    DbaseProvider: IDtDbaseProvider;
    WxProvider: IWxRectangle;
    WxETLProvider: 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 data provider creation
    // Create the "Import from Dbase" object
    EtlProvider := EtlTask.Create(EtlObjectType.PlainDataDbaseProvider) As IEtlPlainDataProvider;
    EtlProvider := EtlProvider.Edit;
    EtlProvider.Id := "Dbase_Provider";
    EtlProvider.Name := "Import from Dbase";
    EtlProvider.Description := "Import from Dbase";
    // Set up data provider
    DbaseProvider := EtlProvider.Provider As IDtDbaseProvider;
    DbaseProvider.Path := "c:\";
    DbaseProvider.DriverVersion := "dBASE IV";
    DbaseProvider.Query := "Select * from Base_1";
    EtlProvider.FillDefault;
    // Save data provider
    EtlProvider.Save;
    // End of data provider creation
    // Start of visual object creation
    WxProvider := EtlTask.Workspace.CreateRectangle;
    WxETLProvider := New WxETLObject.Create;
    WxETLProvider.ETLObject := EtlProvider;
    WxProvider.Style.TextPosition := WxTextPosition.Bottom;
    WxProvider.Style.PictureMarginTop := -10;
    WxProvider.PinPosition := New GxPointF.Create(5050);
    WxProvider.Extension := WxETLProvider As IWxShapeExtension;
    // End of visual object creation
    // Save ETL task
    MObj.Save;
End Sub UserProc;

After executing the example the Import from Dbase object is created in the ETL task. This data provider imports data from the database file. During connection the dBASE IV drivers are used.

See also:

IDtDbaseProvider