Data Type Mapping | Generic JDBC Connector | QueryGrid - Generic JDBC Data Type Mapping - Teradata QueryGrid

QueryGridâ„¢ Installation and User Guide - 3.06

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata QueryGrid
Release Number
3.06
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-07
dita:mapPath
ndp1726122159943.ditamap
dita:ditavalPath
ft:empty
dita:id
lxg1591800469257
Product Category
Analytical Ecosystem
The Generic JDBC connector uses JDBC types (java.sql.Types) for mapping Analytics Database data types to target data types. It relies on the return value of ResultSetMetaData.GetColumnType() to retrieve the data type of a target column and then maps it to QueryGrid global types.

Global Types to Generic JDBC Data Types

When a temporary table is created on the target database, the initiating Teradata connector maps the Analytics Database data types to global data types. The global data types are then mapped to JDBC data types using the Generic JDBC connector.

Data Type Global Data Type JDBC Data Type
Byteint G_Bit BIT
Blob G_Blob BLOB
Byteint G_Boolean BOOLEAN
Bigint G_BigInt BIGINT
Integer G_Integer INTEGER
Smallint G_SmallInt SMALLINT
Byteint G_ByteInt SMALLINT
Byte G_Byte BINARY
Varbyte G_Varbyte VARBINARY
Char G_Char_Latin/G_Char_UTF16 CHAR/NCHAR
Clob G_Clob_Latin/G_Clob_UTF16 CLOB/NCLOB
Date G_Date DATE
Decimal G_Decimal DECIMAL
Double precision G_Double FLOAT
Number G_Number DECIMAL
Float G_Float FLOAT
Timestamp G_TimeStamp TIMESTAMP
Time with time zone G_TimeWithTimeZone TIME_WITH_TIMEZONE
Timestamp with time zone G_TimeStampWithTimeZone TIMESTAMP_WITH_TIMEZONE
Time G_Time TIME
Varchar G_Varchar_Latin/G_Varchar_UTF16 VARCHAR/NVARCHAR

Generic JDBC Data Types to Global Types

The Generic JDBC target connector maps JDBC data types to global data types. The global data types, are mapped to the Analytics Database data types using the initiator connector.

JDBC Data Type Global Data Type Data Type
BIT G_Bit Byteint
BYTE, LONGVARBINARY G_Blob Blob
BOOLEAN G_Boolean Byteint
BIGINT G_BigInt Bigint
INTEGER G_Integer Integer
TINYINT, SMALLINT G_SmallInt Smallint
BINARY G_Byte Byte
VARBINARY G_Varbyte Varbyte
CHAR, NCHAR G_Char_UTF16 Char
LONGVARCHAR, CLOB, LONGNVARCHAR, NCLOB G_Clob_UTF16 Clob
DATE G_Date Date
DECIMAL G_Decimal Decimal
REAL, FLOAT, DOUBLE G_Double Double precision
NUMERIC G_Number Number
TIMESTAMP G_Timestamp Timestamp
TIME_WITH_TIMEZONE G_TimestampWithTimeZone Time with time zone
TIME G_Time Time
VARCHAR, NVARCHAR, ARRAY G_Varchar_UTF16 Varchar
When a target table contains unsupported data types, the NVP Unsupported Datatypes can be set to Cast to Varchar to convert the column with the unsupported type to VARCHAR. This is only supported with data types that can be converted to VARCHAR and the reverse, from VARCHAR data type to the unsupported data type.