DataDirect ODBC connection to Hive

Posted by artiintell on 24-Mar-2015 05:18

Hi,

I am trying to use DataDirect ODBC driver to connect to HiveServer. The question I have is where I can find what types are supported by DataDirect driver and if there is a conversion between Source system types and DataDirect driver types then what it would look like? To make it clear I know that one can create a table in Hive with column that has type array<float>. So how DataDirect will read this field? As an array or as a string or as anything else? Hope this makes sense but happy to clarify if you need more information. 

Could anyone assist with this?

Thanks

All Replies

Posted by Phil on 24-Mar-2015 15:59

Hello,

Information on data type mappings specifically can be found here:

media.datadirect.com/.../help.html

Please note that since these documents were published, we've added support for a few Hive features and data types.  These updates will be included in the full documentation shortly, but in the meantime their description can be found in the readme files.  I've included the relevant text here for convenience:

The Driver for Apache Hive Support for Date and Varchar Data Types

------------------------------------------------------------------

The driver has been enhanced to support the Date and Varchar data types

in Hive 0.12 and higher. The following table shows how these Hive data types

map to standard ODBC data types:

Apache Hive ODBC

----------- ----

Date maps to SQL_DATE

Varchar maps to SQL_VARCHAR

Links to both the User's Guide and the README files can be found on our website at: www.progress.com/.../progress-datadirect-connect-and-connect-xe-for-odbc-books-and-readme-file

As for your specific example, the driver does not currently support native array types.  Selecting from tables containing this type can be done, but trying to fetch these columns via SQLBindCol() or SQLGetData() will result in an error indicating that the type is unsupported.  Using SQLBindCol() or SQLGetData() on other columns within the result set should be fine, however.

Phil

This thread is closed