IDtObjectMetaData.Views

Syntax

Views: Array;

Description

The Views method returns string array, that contains names of data source or consumer views.

Example

Executing the example requires that the repository contains an ETL task with the Etl identifier. The first task object is any data source, that uses drivers OLE DB for connection. For example, import from Access.

Sub Main;

Var

MB: IMetabase;

Task: IEtlTask;

Provider: IEtlPlainDataProvider;

MetaData: IDtObjectMetaData;

Arr, Arr1: Array Of String;

s: String;

Begin

MB := MetabaseClass.Active;

Task := MB.ItemById("ETL").Bind As IEtlTask;

Provider := Task.Item(0) As IEtlPlainDataProvider;

MetaData := Provider.Provider As IDtObjectMetaData;

Arr := MetaData.Tables;

Arr1 := MetaData.Views;

Debug.WriteLine("Table");

For Each s In Arr Do

Debug.WriteLine(s);

End For;

Debug.WriteLine("View");

For Each s In Arr1 Do

Debug.WriteLine(s);

End For;

End Sub Main;

After executing the example the development environment console displays a list of tables and views, kept in the object, to which data provider of the ETL task is set.

See also:

IDtObjectMetaData