com.teradata.fnc.TeradataType Class | Teradata Vantage - com.teradata.fnc.TeradataType - 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™

Purpose

The com.teradata.fnc.TeradataType enum provides data type information about a particular column being passed to a table operator. The get method returns the TeradataType enum value corresponding to the integer value provided as input.

enum TeradataType

The following lists a sample of the values defined in this enum.

public enum TeradataType {
    UNDEF_DT(0),
    CHAR_DT(1),
    VARCHAR_DT(2),
    BYTE_DT(3),
    VARBYTE_DT(4),
    GRAPHIC_DT(5),
    VARGRAPHIC_DT(6), 
    BYTEINT_DT(7),
    SMALLINT_DT(8),
    INTEGER_DT(9),
    REAL_DT(10),
    DECIMAL1_DT(11),

    ...
   
    DATE_DT(15),
    TIME_DT(16),
    TIMESTAMP_DT(17),
    INTERVAL_YEAR_DT(18),

    ...

    TIME_WTZ_DT(31),
    TIMESTAMP_WTZ_DT(32),
    BLOB_REFERENCE_DT(33), 
    CLOB_REFERENCE_DT(34),
    UDT_DT(35),    
    BIGINT_DT(36),        
    DECIMAL16_DT(37),     
    NUMBER_DT(38),
    PERIOD_DT(39),
    JSON_DT(40),
    DATASET_AVRO_DT(41),
    ST_GEOMETRY_DT(42), 
    MBR_DT(43),
    MBB_DT(44),
    ARRAY_DT(45),
    XML_DT(46), 
    DATASET_CSV_DT(47),

    ...
}

get(int)

TeradataType get(int  type)
                       throws IllegalArgumentException

Returns the TeradataType enum entry corresponding to the integer value provided as input. For example, the method returns XML_DT for an input value of 46.

The method throws IllegalArgumentException if an unsupported column type is encountered. A database specific code is returned with message “Unsupported column type: <type_name>".