16.20 - SelectFromObjectList - Teradata Vantage NewSQL Engine

Teradata Vantage™ Application Programming Reference

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
created_date
March 2019
category
Programming Reference
featnum
B035-1090-162K

Displays the database and table objects contained within a specified object list.

Definition

REPLACE PROCEDURE TDSTATS.SelectFromObjectList(
  IN ObjectListName   VARCHAR(128) CHARACTER SET UNICODE,
  IN ObjectListId     BIGINT,
  IN ResolveWildCards CHAR(1) CHARACTER SET LATIN)
           .
           .
           .
;

Input Parameters

Parameter Description
ObjectListName Name of the existing object list.
If you specify NULL, all object lists in the TDSTATS database are displayed.
ObjectListId ID of an existing object list.
ResolveWildCards Possible values:
  • Y. If you specify Y, object names containing wildcard characters will be expanded.
  • N. If you specify N, wildcard characters within object names will be retained. This is the default value.

Usage Notes

You can view object list data in the TDSTATS.ObjectList and TDSTATS.ObjectListEntry tables. The names of the object lists are stored in the TDSTATS.ObjectList.ListName column.

Returning Result Set

The output of this external stored procedure is in the form of a stored procedure dynamic result. That is, the external stored procedure can return result sets to the client application or to the caller of the external stored procedure (in addition to consuming the result sets itself) upon completion of the external stored procedure.

For more information about stored procedure dynamic result sets, see Teradata Vantage™ SQL External Routine Programming , B035-1147 .

Displaying Statistics

To display ... You must specify ...
the objects for a specified list either a value for ObjectListName or ObjectListId.
all lists stored in the TDSTATS database NULL for ObjectListName and ObjectListId.

Ouput Parameters

Parameter Description
ObjectListName Name of object list containing the object name. For more information, see the ObjectName output parameter.
DatabaseName Database whose objects are contained in the object list. For more information, see the ObjectListName output parameter.
ObjectName Table contained within the object list. If you specify NULL, all tables in the DatabaseName output parameter are contained in the list. For more information, see the ObjectListName or DatabaseName output parameters.

Example: Using SelectFromObjectList

The following example shows how to display all objects in the list named MyObjects.

CALL TDSTATS.SelectFromObjectList('MyObjects',NULL,'Y');
 *** Query completed. 4 rows found. 1 column returned.
 *** Total elapsed time was 1 second.
ObjectListName  DatabaseName  ObjectName
--------------  ------------  ----------
MyObjects       db1           ?
MyObjects       db2           tx
MyObjects       db3           tx
MyObjects       db3           ty
MyObjects       db3           tz