admin管理员组

文章数量:1402975

I am using the ODBC diver via .NET 4.8 to connect to Dremio but getting this error:

System.Data.Odbc.OdbcException
  HResult=0x80131937
  Message=ERROR [HYC00] [Apache Arrow][Flight SQL] (100) Unsupported function.
  Source=Arrow Flight ODBC Driver
  StackTrace:
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcParameter.Bind(OdbcStatementHandle hstmt, OdbcCommand command, Int16 ordinal, CNativeBuffer parameterBuffer, Boolean allowReentrance)
   at System.Data.Odbc.OdbcParameterCollection.Bind(OdbcCommand command, CMDWrapper cmdWrapper, CNativeBuffer parameterBuffer)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
   at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)

When trying to run for example, this parameterised query:

SELECT DISTINCT "R_NAME" FROM "REGION" WHERE ("REGION"."R_NAME" = ?)

I have also tried these notations:

SELECT DISTINCT "R_NAME" FROM "REGION" WHERE ("REGION"."R_NAME" = $1)
SELECT DISTINCT "R_NAME" FROM "REGION" WHERE ("REGION"."R_NAME" = @Parameter0)

The ODBC connection has the schema set and this for example works:

SELECT DISTINCT "R_NAME" FROM "REGION" WHERE ("REGION"."R_NAME" = '<REGION NAME>')

A few other points:

  • I am running Dremio locally using Docker.
  • The Database backing this is Snowflake in this instance.
  • The queries do not appear to be even hitting Dremio (no evidence in the Jobs tab).

Not sure why this would be an 'Unsupported Function'. And I am not sure how to go about debugging this. I can't figure out, for example, how to enable any additional logging for the ODBC driver (nothing mentioned here - /).

I am using the ODBC diver via .NET 4.8 to connect to Dremio but getting this error:

System.Data.Odbc.OdbcException
  HResult=0x80131937
  Message=ERROR [HYC00] [Apache Arrow][Flight SQL] (100) Unsupported function.
  Source=Arrow Flight ODBC Driver
  StackTrace:
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcParameter.Bind(OdbcStatementHandle hstmt, OdbcCommand command, Int16 ordinal, CNativeBuffer parameterBuffer, Boolean allowReentrance)
   at System.Data.Odbc.OdbcParameterCollection.Bind(OdbcCommand command, CMDWrapper cmdWrapper, CNativeBuffer parameterBuffer)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
   at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
   at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)

When trying to run for example, this parameterised query:

SELECT DISTINCT "R_NAME" FROM "REGION" WHERE ("REGION"."R_NAME" = ?)

I have also tried these notations:

SELECT DISTINCT "R_NAME" FROM "REGION" WHERE ("REGION"."R_NAME" = $1)
SELECT DISTINCT "R_NAME" FROM "REGION" WHERE ("REGION"."R_NAME" = @Parameter0)

The ODBC connection has the schema set and this for example works:

SELECT DISTINCT "R_NAME" FROM "REGION" WHERE ("REGION"."R_NAME" = '<REGION NAME>')

A few other points:

  • I am running Dremio locally using Docker.
  • The Database backing this is Snowflake in this instance.
  • The queries do not appear to be even hitting Dremio (no evidence in the Jobs tab).

Not sure why this would be an 'Unsupported Function'. And I am not sure how to go about debugging this. I can't figure out, for example, how to enable any additional logging for the ODBC driver (nothing mentioned here - https://docs.dremio/current/sonar/client-applications/drivers/arrow-flight-sql-odbc-driver/).

Share Improve this question asked Mar 27 at 12:08 chrisbchrisb 1,4251 gold badge17 silver badges35 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

From this:
https://community.dremio/t/is-parameterized-sql-not-supported-by-dremio/4650/2

It appears that as of now the ODBC driver does not support parameterised queries which would likely explain this.

The current driver is 0.9.1 from July 2022 so approx ~2.5 years since any updates.

本文标签: