list_td_reserved_keywords() | Teradata Package for Python - list_td_reserved_keywords() - Teradata VantageCloud Lake

Lake - Analyze Your Data with ClearScape Analytics™

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2026-02-20
dita:mapPath
tcl1683670667798.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
tcl1683670667798

Use the list_td_reserved_keywords() function to validate if the specified string or list of strings is a Teradata reserved keyword or not.

If a key is not specified in the function call, all the Teradata reserved keywords are displayed.
Optional arguments:
  • key specifies a string or list of strings to validate if it is a Teradata reserved keyword.
  • raise_error specifies whether to raise exception or not.

    When set to True, an exception is raised, if specified "key" is a Teradata reserved keyword, otherwise not.

    The default value is False.

Example Setup

>>> from teradataml import list_td_reserved_keywords

Example 1: List all available Teradata reserved keyword

>>> list_td_reserved_keywords()
         restricted_word
       0             ABS
       1         ACCOUNT
       2            ACOS
       3           ACOSH
       4      ADD_MONTHS
       5           ADMIN
       6             ADD
       7     ACCESS_LOCK
       8    ABORTSESSION
       9           ABORT

Example 2: Validate if keyword "account" is a Teradata reserved keyword or not

>>> list_td_reserved_keywords("account")
True

Example 3: Validate and raise exception if keyword "account" is a Teradata reserved keyword

>>> list_td_reserved_keywords("account", raise_error=True)
TeradataMlException: [Teradata][teradataml](TDML_2121) 'account' is a Teradata reserved keyword.

Example 4: Validate if the list of keywords contains Teradata reserved keyword or not

>>> list_td_reserved_keywords(["account", 'add', 'abc'])
True

Example 5: Example 5: Validate and raise exception if the list of keywords contains Teradata reserved keyword

>>> list_td_reserved_keywords(["account", 'add', 'abc'], raise_error=True)
TeradataMlException: [Teradata][teradataml](TDML_2121) '['ADD', 'ACCOUNT']' is a Teradata reserved keyword.