Custom Clause - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

You can specify Custom clauses when invoking a table operator to customize and make the operator polymorphic. Custom clauses are similar in principle to the way GROUP BY and HAVING clauses apply to aggregation. The input is a list of key-value pairs. The contract function can validate the Custom clauses and return a syntax error if the Custom clauses are invalid. The clauses can contain names and literal values. For the literal value custom argument clauses, the type information is interpreted using the current syntaxer rules. For example, 1 is a BYTEINT and '1' is a VARCHAR(1) CHARACTER SET x, where x is the character set of the creator of the table operator. You cannot use a Teradata reserved word for a key, and the total length of custom clauses must be at most 64K bytes.

You can use the following functions to access information related to the Custom clauses, such as Type and Value.

  • FNC_TblOpGetCustomKeyCount
  • FNC_TblOpGetCustomKeyInfoOf
  • FNC_TblOpGetCustomKeyInfoAt
  • FNC_TblOpGetCustomValuesOf

For details about these functions, see Table Operator Interface.