Data Types

The Simba Apache Hive ODBC Connector supports many common data formats, converting between Hive data types and SQL data types.

The following table lists the supported data type mappings.

Hive Type SQL Type

BIGINT

SQL_BIGINT

BINARY

SQL_VARBINARY

BOOLEAN

SQL_BIT

CHAR(n)

SQL_CHAR

Note:

SQL_WCHAR is returned instead if the Unicode SQL Character Types configuration option (the UseUnicodeSqlCharacterTypes key) is enabled.

DATE

SQL_TYPE_DATE

DECIMAL

SQL_DECIMAL

DECIMAL(p,s)

SQL_DECIMAL

DOUBLE

SQL_DOUBLE

FLOAT

SQL_REAL

INT

SQL_INTEGER

SMALLINT

SQL_SMALLINT

STRING

SQL_VARCHAR

Note:

SQL_WVARCHAR is returned instead if the Unicode SQL Character Types configuration option (the UseUnicodeSqlCharacterTypes key) is enabled.

TIMESTAMP

SQL_TYPE_TIMESTAMP

TINYINT

SQL_TINYINT

VARCHAR(n)

SQL_VARCHAR

Note:

The aggregate types (ARRAY, MAP, and STRUCT) are not supported. Columns of aggregate types are treated as STRING columns.

The interval types (YEAR TO MONTH and DAY TIME) are supported only in query expressions and predicates. Interval types are not supported as column data types in tables.