IDtWebProvider.TableAttributeValue

Syntax

TableAttributeValue: String;

Description

The TableAttributeValue property determines the value of the table attribute, data of which has to be imported.

Comments

Is used together with the TableAttributeName property. It is relevant if the TableIdentificationType property is set to the DtWebTableIdentificationType.ByAttribute value.

Example

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

Sub Main;

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 the provider creation

//The Import From Web object creation

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 provider

EtlProvider.Save;

//End of 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(50, 50);

WxProvider.Extension := WxETLProvider As IWxShapeExtension;

//End of visual object creation

//Save Etl task

MObj.Save;

End Sub Main;

After executing the example the Import from Web object is created in the ETL task. The provider imports data from the Data.html HTML file. Importing table is searched by attribute NameTable values. Field names are imported from the first table row.

See also:

IDtWebProvider | IDtWebProvider.TableAttributeName