New Variant Type (Teradata Database) - Teradata Warehouse Miner

Teradata® Warehouse Miner™ User Guide - Volume 2ADS Generation

Teradata Warehouse Miner
Release Number
November 2018
English (United States)
Last Update
Product Category

This function is only available when connected to a Teradata system.

“VARIANT_TYPE” is a built-in User Defined Type available in Teradata 13.00 and later releases which can be used to pass in a varying number and type of arguments as a single input parameter to a User-Defined Function. When used, the keywords “NEW VARIANT_TYPE” are followed in the SQL syntax by a list of expressions and aliases. If an expression is not a SQL column, an alias is required. If an expression is a SQL column, an alias is optional. A hypothetical example of the syntax for this feature is shown below.

SYSLIB.MyFunction(NEW VARIANT_TYPE(columA AS a, 10*columnB AS 10b))

In order to support this feature, two SQL Elements are available in the Other category: New Variant Type and Expression with Alias. When dragged or selected into the work area, the New Variant Type element has an expression folder immediately underneath it, where columns and/or Expression with Alias expressions can be placed. The Properties dialog for a column contains a new field called Parameter Alias which can be used to assign an optional alias name to a column parameter. An alias name can alternately be associated with a column by clicking slowly on the column label in the work area and entering a value.

For information about the Expression with Alias SQL element, see Expression With Alias (Teradata Database).