sql-serverodbcclouderaimpalalinked-server

MSDASQL provider throws error for cloudera Impala : Requested conversion is not supported


We are trying to pull unicode data from Cloudera Impala into SQL Server. We have done the below steps:

  1. We have installed Cloudera Impala ODBC driver and configured DSN. We have enabled "SQL Unicode Types" in the DSN settings.

Use SQL Unicode Types

  1. We have created linked server in SQL Server accordingly for the DSN. We have set the option "Collation Compatibility" to True.

When we run the below query, we are getting error as given below:

SELECT *
from openquery
(LinkedServerName,'SELECT  columnName from SchemaName.ViewName where col_id = ''ABCDEFGH''')

OLE DB provider "MSDASQL" for linked server "LinkedServerName" returned message "Requested conversion is not supported.". Msg 7341, Level 16, State 2, Line 1 Cannot get the current row value of column "[MSDASQL].columnName" from OLE DB provider "MSDASQL" for linked server "LinkedServerName".

We also tried below CASTING:

  1. Using CAST to VARCHAR(50)
SELECT CAST(columnName AS VARCHAR(50))

But, we get the below error:

Msg 7355, Level 16, State 1, Line 1 The OLE DB provider "MSDASQL" for linked server "linkedServer" supplied inconsistent metadata for a column. The name was changed at execution time.

Note: When we disable "Enable SQL unicode datatypes" in DSN settings, we are able to pull data without issues. But, the unicode characters are coming as boxes.

can you please help us, in resolving the issue.


Solution

  • We were able to fix the unicode issue, by going with below settings for cloudera Impala ODBC 64 bit driver and linked server.

    1. 64 bit ODBC driver settings in DSN for cloudera Impala

    ODBC driver settings

    ODBC driver advanced settings

    1. Linked Server settings in SQL Server

    Linked Server Settings