Hive has a single data
type for storing text,
STRING, which is a
variable-length character string with a maximum size of 2G. As a result,
this can create very large character fields when processing data.
Since Hive’s string type is comparable to
VARCHAR in
other data sources, you can set the ODBC attribute,
Max
Varchar Size to specify the maximum character string
size. Set the
Max Varchar Size value using
Advanced Options in Windows ODBC Administrator, or in Unix by editing
odbc.ini in
the specified path or $HOME directory.
You can also specify
this option in a connection string using the
CONOPTS container.
Here is an example:
DRIVER=ODBC;DB=hive;UID=dbitest;PWD=dbigrp1;SCHEMA=default;CONOPTS=(MaxVarcharSize=300);CATALOG=FOO;.