Adds a database or table name to an existing named object list.
Definition
REPLACE PROCEDURE TDSTATS.AddObjectListEntry( IN ObjectListName VARCHAR(128) CHARACTER SET UNICODE, IN ObjectListId BIGINT, IN DatabaseName VARCHAR(128) CHARACTER SET UNICODE, IN ObjectName VARCHAR(128) CHARACTER SET UNICODE) . . . ;
Input Parameters
Parameter | Description |
---|---|
ObjectListName | Name of the existing object list. An object list may contain a mixture of databases and individual tables. |
ObjectListId | ID of the existing object list. |
DatabaseName | Name of the database containing the objects being added. This input parameter may contain wildcard characters (%, _). For more information about wildcard characters, see “Usage Notes.” This input parameter cannot be NULL.
|
ObjectName | Name of the table to be added. If you specify NULL, all objects defined in the DatabaseName are added to the list. If you specify a value other than NULL, you must define the ObjectName within DatabaseName. This input parameter may contain wildcard characters (%, _). For more information about wildcard characters, see “Usage Notes.” |
Usage Notes
You must specify ObjectListName or ObjectListId to identify the list previously created via a call to CreateObjectList. For details, see CreateObjectList.
Object list data can be viewed in the TDSTATS.ObjectList and TDSTATS.ObjectListEntry tables. The names of the object lists are stored in the TDSTATS.ObjectList.ListName column.
The SQL DROP DATABASE, DROP TABLE, MODIFY DATABASE, and ALTER TABLE statements will not have their actions automatically reflected in the TDSTATS.ObjectListEntry table. For more information about these SQL statements, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.
For DatabaseName and ObjectName, wildcard characters are resolved dynamically at the time in which an object list is passed in calling the Automate, Analyze, or PrepCollect APIs. For more information about wildcard characters, see the following topic.
Wildcard Characters
Character | Description |
---|---|
% (PERCENT SIGN) | Represents any string of zero or more arbitrary characters. Any string of characters is acceptable as a replacement for the percent. |
_ (LOW LINE) | Represents exactly one arbitrary character. Any single character is acceptable in the position in which the underscore character appears. |
For more information on how to use these wildcard characters, see the SQL LIKE clause in Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.
Example: Using AddObjectListEntry
The following example shows how to create an object list named MyObjects consisting of databases db1, db2.tx, and db3.t%.
CALL TDSTATS.CreateObjectList('MyObjects',ObjectListId); CALL TDSTATS.AddObjectListEntry('MyObjects',NULL,'db1',NULL); CALL TDSTATS.AddObjectListEntry('MyObjects',NULL,'db2','tx'); CALL TDSTATS.AddObjectListEntry('MyObjects',NULL,'db3','t%');