The following table shows how the Apache Hive data types are mapped to the standard ODBC data types.

Table 1. Apache Hive Data Types
Apache Hive ODBC
Bigint SQL_BIGINT
Boolean SQL_BIT
Char1 SQL_WCHAR
Date SQL_DATE
Decimal SQL_DECIMAL
Double SQL_DOUBLE
Float SQL_REAL
Int SQL_INTEGER
Smallint SQL_SMALLINT
String2 SQL_WVARCHAR3
Timestamp SQL_TYPE_TIMESTAMP
Tinyint SQL_TINYINT
Varchar4 SQL_WVARCHAR
1 Setting of the UseUnicodeCharTypes connection option determines where this data type maps. For example, if set to 0 (SQL_CHAR), this data type maps to SQL_CHAR.
2 Setting of the StringDescribeType connection option determines where this data type maps. For example, if set to 12 (SQL_VARCHAR), this data type maps to SQL_VARCHAR.
3 Maximum of 2 GB
4 Setting of the UseUnicodeCharTypes connection option determines where this data type maps. For example, if set to 0 (SQL_VARCHAR), this data type maps to SQL_VARCHAR.