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

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-09
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
dita:id
rkb1531260709148
Product Category
Teradata Vantage

Use the list_td_reserved_keywords() function to validate if the specified string is 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 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.