tdr.SetError Function | R Table Operators | Teradata Vantage - tdr.SetError - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantageā„¢

Sets an error code and message to be displayed on the console when the query invoking the table operator is executed and an error is encountered.

Syntax

tdr.SetError(code,  message)

Syntax Elements

code
Parameter type: character

An error code.

message
Parameter type: character

An error message.

Example: Displaying an Error Code and Message

Suppose the data in the input table has invalid values. You can report the error using the following statement which prints out the error code "U1003" with message "Invalid Value for Division Number".

tdr.SetError("U1003", "Invalid Value for Division Number")