Teradata Datatype to BigQuery Datatype Equivalents
Here are the Teradata datatypes and its Big Query equivalents
Teradata | BigQuery |
INTEGER | INT64 |
SMALLINT | INT64 |
BYTEINT | INT64 |
BIGINT | INT64 |
DECIMAL | NUMERIC You cannot specify Scale and precision. BigQuery automatically detects and assigns it. NUMERIC can have up to 9 digits after the dot |
FLOAT | FLOAT64 |
NUMERIC | NUMERIC |
NUMBER | NUMERIC |
REAL | FLOAT64 |
CHAR / CHARACTER | STRING |
VARCHAR | STRING |
CLOB | STRING |
JSON | STRING |
BLOB | BYTES |
BYTE | BYTES |
VARBYTE | BYTES |
DATE | DATE |
TIME | TIME |
TIME WITH TIME ZONE | TIME (Only UTC Supported) |
TIMESTAMP | TIMESTAMP |
TIMESTAMP WITH TIME ZONE | TIMESTAMP |
ARRAY | ARRAY |
MULT DIMENSIONAL ARRAY | ARRAY (Use ARRAY OF STRUCTS) |
INTERVAL HOUR | INT64 |
INTERVAL MINUTE | INT64 |
INTERVAL SECOND | INT64 |
INTERVAL DAY / INTERVAL MONTH / INTERVAL YEAR | INT64 |
PERIOD(DATE) | Not Supported (Split it into two DATE columns) |
PERIOD(TIMESTAMP), PERIOD(TIME), PERIOD(TIME WITH TIME ZONE) | Not Supported (eg. Split into two TIMESTAMP Columns) |
UDT | STRING |
XML | STRING |
TD_ANYTYPE | STRING |
The Roboquery Query Converter automatically converts the datatypes - Its fast and free. Try it now!
Post Comment