Hadoop / Cloudera query via ODBC, Count(1) with Group by

Toad Data Point 3.4.0.2038

Prefaced with I’m a total noob to Hadoop/Cloudera. I was instructed to download “Cloudera ODBC driver for Impala 2.5”.

I then created ODBC connection and was able to connect straight away.

I can query rows ok. I can query a “select count(1) from table” ok.

But when I start to add columns to group by such as “SELECT field1, count(1) FROM table group by field1;” I get the “fatal” error below. “Fatal” = the pop up window from T.D.P.

The individual message I get in the normal “non fatal” error message box = “[Cloudera][ODBC] (10550) Invalid result set column number, no matching column found.”

I sent query to peer using a different SQL client and they can run the query ok.

Quest.Toad.NativeOdbc.NativeOdbcException
[Cloudera][ODBC] (10550) Invalid result set column number, no matching column found.
Stack Trace:
at Quest.Toad.NativeOdbc.OdbcDiagnostic.PrintDiagnosticInformation(OdbcHandle handle, RETURNCODE code)
at Quest.Toad.NativeOdbc.UnManagedColumnDescriptor.GetBufferDataAsString(UInt16 rowOffset)
at Quest.Toad.NativeOdbc.OdbcDataReader.GetValue(Int32 i)
at Quest.Toad.Odbc.OdbcToadConnection.ReadRow(IDataReader reader, FastTable datatable, FastReadOptions options, PrePostProcessHandler prePostProcessHandler)
at Quest.Toad.Db.ToadDataAdapter.InternalReadBackground()

In the end I have no clue to if it’s T.D.P, my ODBC set up, the Cloudera ODBC driver, etc.

Thanks for any help.

We have not certified that ODBC driver. I don’t recognize that error. We do support Hive and HBase as specific connection types (not through ODBC). I am not familiar with Cloudera so I am not sure how to help on this. I also don’t have access to such an instance.

Hello again, one year almost to the day later.

(TDP 3.6.1)

We have more users trying to connect to a Hadoop environment via the Cloudera ODBC Driver and getting errors. (Very) simple queries work but fail when trying to use aggregates like GROUP BY or SUM

Your documentation states you support “Any ODBC 3.0 compliant data source”.

Are the Cloudera drivers or the Hadoop environment not 3.0 compliant?

www.cloudera.com/…/impala-odbc-v2-5-26.html

We do not get these errors when querying via freeware versions of other SQL clients.

Thanks. I see a KB post from late 2014 saying you do not support Cloudera, but asking for a clarification related to your documentation statement regarding ODBC 3.0.

Thanks much.


error text

Quest.Toad.NativeOdbc.NativeOdbcException

[Cloudera][ODBC] (10550) Invalid result set column number, no matching column found.

Stack Trace:

at Quest.Toad.NativeOdbc.OdbcDiagnostic.PrintDiagnosticInformation(OdbcHandle handle, RETURNCODE code)

at Quest.Toad.NativeOdbc.UnManagedColumnDescriptor.GetBufferDataAsString(UInt16 rowOffset)

at Quest.Toad.NativeOdbc.OdbcDataReader.GetValue(Int32 i)

at Quest.Toad.Odbc.OdbcToadConnection.ReadRow(IDataReader reader, FastTable datatable, FastReadOptions options, PrePostProcessHandler prePostProcessHandler)

at Quest.Toad.Db.ToadDataAdapter.InternalReadBackground()

I use an ODBC connection for Cache and the problem there is the SQL is a little different. Even functions with the exact same name and purpose had different syntax. It was only a little different, but that is all it takes. It does not understand simple things like – to comment out a line, you have to use /* and */ only. Try Googling your issue, you many not be the first person to encounter that issue.

Toad Data Point supports native provider for Hadoop. I’d suggest to try it with the latest beta or trial version.

Use the Hive connection type as shown below.

Hive_Hadoop.png