IDtWebProvider.TableAttributeName

Syntax

TableAttributeName: String;

Description

The TableAttributeName property determines name of the table attribute, which data should be imported.

Comments

This attribute is searched in the <Table> tag. It is used together with the TableAttributeValue property. The property is relevant is the TableIdentificationType property is set to DtWebTableIdentificationType.ByAttribute.

Example

Executing the example requires that the repository contains an ETL task with the ETL identifier and the Data.html file in the root of the C disk. There is the NameTable attribute in the table code in the <Table> tag.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    EtlTask: IEtlTask;
    EtlProvider: IEtlPlainDataProvider;
    WebProvider: IDtWebProvider;
    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 Web" object
    EtlProvider := EtlTask.Create(EtlObjectType.PlainDataWebProvider) As IEtlPlainDataProvider;
    EtlProvider := EtlProvider.Edit;
    EtlProvider.Id := "Web_Provider";
    EtlProvider.Name := "Import from Web";
    EtlProvider.Description := "Import from Web";
    // Set up data provider
    WebProvider := EtlProvider.Provider As IDtWebProvider;
    WebProvider.HasHeader := True;
    WebProvider.TableIdentificationType := DtWebTableIdentificationType.ByAttribute;
    WebProvider.TableAttributeName := "NameTable";
    WebProvider.TableAttributeValue := "Two_Table";
    WebProvider.Url := "c:\Data.html";
    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 Web object is created in the ETL task. This data provider imports data from the HTML file. The imported table is searched by values of the NameTable attribute. Field names are imported from the first table row.

See also:

IDtWebProvider | IDtWebProvider.TableAttributeValue