skip to main content
Supported data types : Apache Hive data types
 

Try DataDirect Cloud Now

Apache Hive data types

The following table shows how the Apache Hive data types are mapped to the standard data types for ODBC and JDBC.
Note: When the EnableWCharSupport connection parameter is set to true for the DataDirect Cloud Driver for ODBC, character types are mapped to the corresponding ODBC W-Types. For example, the varchar(max) type is mapped to the Unicode type SQL_WLONGVARCHAR.
Table 2. Apache Hive data types
Apache Hive type
JDBC type
ODBC data type
BIGINT
BIGINT
SQL_BIGINT(type-5)
BINARY 1
VARBINARY
SQL_VARBINARY(-3)
BOOLEAN
BOOLEAN
SQL_BIT(type-7)
DOUBLE
DOUBLE
SQL_DOUBLE(8)
FLOAT
REAL
SQL_REAL(7)
INT
INTEGER
SQL_INTEGER(4)
SMALLINT
SMALLINT
SQL_SMALLINT(5)
TIMESTAMP
TIMESTAMP
SQL_TYPE_TIMESTAMP(93)
TINYINT
TINYINT
SQL_TINYINT(-6)
STRING
VARCHAR or LONGVARCHAR 2
SQL_WVARCHAR(-9) or SQL_WVARCHAR(12)
SQL_WLONGVARCHAR(-10) or SQL_LONGVARCHAR(-1)
TIMESTAMP
TIMESTAMP
SQL_TYPE_TIMESTAMP(93)

1 Supported only with HiveServer1.

2 If the StringDescribeType parameter is set to varchar (the default), this data type maps to VARCHAR. If set to longvarchar, this data type maps to LONGVARCHAR.