Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Running SQL Query from Microsoft SQL Server Management Studio at Hive With Hortonworks ODBC Driver

avatar
New Contributor

Hi All,

When I execute the Query "SELECT * FROM [hadoop].[HIVE].[test].[u_movie2]" with Microsoft SQL Server Management Studio at Hive, I get the following message:

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

But Openqueries can be executed well. So the Query
"SELECT * FROM openquery(Hadoop,'SELECT * FROM u_movie2')" will be performed by Hive.
But I would like to use the first Variant, because it is easier to understand.

I tried many combinations of Linked Server Properties and ODBC Driver Properties, but Nothing what I tried can solve my Problem.

I am using following Components:

  • Hadoop-3.0.2
  • Hive-3.1.0
  • Hortonworks Hive ODBC Driver 2.1.16 (64 bit)

Thanks

Dennis

3 REPLIES 3

avatar
New Contributor

Hello,

Does it work if you try running it like this?

SELECT * FROM openquery([hadoop], 'SELECT * FROM Hive.[test].[u_movie2]')

Also, do you have any of the following options set in your ODBC driver?

  • Fast SQL Prepare
  • Use Async Exec
  • Get Tables with Query
  • Use only SSPI
  • Invalid Session Auto Recover
  • Autreconnect

avatar
Cloudera Employee

avatar
New Contributor

@Julian are you saying that the above options need to be selected? I'm getting the same error, but I even get the error when I use openquery. I detail specifics here: https://community.hortonworks.com/questions/242899/why-is-my-hive-ql-query-that-i-run-in-ssms-via-op...