Padding zero-length string data with HiveODBC

One of the more esoteric error messages that you may receive from the HiveODBC driver connection is:

SQL_ERROR Failed to get data for column zu

When connecting to Hive using the HiveODBC driver using a linked server connection, the full error message looks something like:

OLE DB provider “MSDASQL” for linked server “MySQLHive” returned message “SQL_ERROR Failed to get data for column zu”.
OLE DB provider “MSDASQL” for linked server “MySQLHive” returned message “SQL_ERROR get signed long int data failed for column 9. Column index out of bounds.”.
OLE DB provider “MSDASQL” for linked server “MySQLHive” returned message “Option value changed”.
Msg 7330, Level 16, State 2, Line 1
Cannot fetch a row from OLE DB provider “MSDASQL” for linked server “MySQLHive”.

Thanks to some digging by James Baker and Dave Mariani (@dmariani, VP Engineering at Klout), we realized that the ODBC Provider for Hive might not correctly handle zero-length string data returned from Hive.

As noted in the SQL Server Analysis Services to Hive case study, to avoid these issues, avoid returning empty strings from Hive.  For more information, please reference page 12 of the case study.

Hope that helps!

3 Comments

  1. […] Lee (@dennylee) recommended Padding zero-length string data with HiveODBC to avoid an “esoteric error” in a 10/9/2012 post: One of the more esoteric error messages that […]

  2. Thanks! I’d been digging into this for a bit now. Great timing

  3. the hiveodbc driver is not the same driver that is available from msft to connect to hadoop on the azure platform. is this correct? however, once the hiveodbc driver is installed it will run via thrift and allow for querying via the linked server in sql server?

    thanks,
    -robert

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s