Data Type Mapping by Teradata SQL Driver for R between Advanced SQL Engine and R - 17.00 - Data Type Mapping provided by Teradata SQL Driver for R between Advanced SQL Engine and R - Teradata R Package

Teradata® R Package User Guide

prodname
Teradata R Package
vrm_release
17.00
created_date
November 2020
category
User Guide
featnum
B700-4005-090K

The following table lists the Advanced SQL Engine data types supported by the Teradata SQL Driver for R, and shows the corresponding R data type returned in result set rows.

Advanced SQL Engine data type Result set R data type
BIGINT bit64::integer64
BLOB raw
BYTE raw
BYTEINT raw
CHAR character
CLOB character
DATE Date
DECIMAL double
FLOAT double
INTEGER integer
INTERVAL YEAR character
INTERVAL YEAR TO MONTH character
INTERVAL MONTH character
INTERVAL DAY character
INTERVAL DAY TO HOUR character
INTERVAL DAY TO MINUTE character
INTERVAL DAY TO SECOND character
INTERVAL HOUR character
INTERVAL HOUR TO MINUTE character
INTERVAL HOUR TO SECOND character
INTERVAL MINUTE character
INTERVAL MINUTE TO SECOND character
INTERVAL SECOND character
NUMBER double
PERIOD(DATE) character
PERIOD(TIME) character
PERIOD(TIME WITH TIME ZONE) character
PERIOD(TIMESTAMP) character
PERIOD(TIMESTAMP WITH TIME ZONE) character
SMALLINT integer
TIME hms::hms
TIME WITH TIME ZONE character
TIMESTAMP POSIXct
TIMESTAMP WITH TIME ZONE character
VARBYTE raw
VARCHAR character

The following table lists the parameterized SQL bind-value R data types supported by the Teradata SQL Driver for R, and shows the corresponding Advanced SQL Engine data type transmitted to the server.

Bind-value R data type Teradata Database data type
bit64::integer64 BIGINT
character VARCHAR
Date DATE
difftime VARCHAR format compatible with INTERVAL DAY TO SECOND
double FLOAT
integer INTEGER
hms::hms TIME
POSIXct TIMESTAMP
POSIXlt without $gmtoff TIMESTAMP
POSIXlt with $gmtoff TIMESTAMP WITH TIME ZONE
raw VARBYTE
teradatasql::TimeWithTimeZone TIME WITH TIME ZONE
teradatasql::Timestamp TIMESTAMP
teradatasql::TimestampWithTimeZone TIMESTAMP WITH TIME ZONE