ODBC Cloudera for BDD IMPALA does not support double quotes in a query

Technote (troubleshooting)


Problem(Abstract)

Using Cloudera ODBC, the SQL Select from Cognos has column double-quoted, as:
select "bitrate_d"."day" "daykey" , "appli"."nameappli" "nameapplikey" , sum("bitrate_d"."bytes") "bytes" from "Impala"."test"."bitrate_d" "bitrate_d", "Impala"."test"."appli" "appli" where "bitrate_d"."day" etc...

Symptom

This generate a parsing error:
[Cloudera][ImpalaODBC] (110) Error while executing a query in Impala: [HY000] : AnalysisException: Syntax error at: select "bitrate_d"."day" "daykey" , "appli"."nameappli" "nameapplikey" , etc...

Manually removing the double quotes the statement works.


Diagnosing the problem

Perform an ODBC trace to capture the error and make sure the driver is 3.5 compliant

For ODBC trace: See related URL at the bottom of the page

For ODBC compliance: In ODBC trace, SQL_DRIVER_ODBC_VER and SQL_ODBC_VER should be 3.5x as shown below

ODBC trace shows:

SQL_DRIVER_NAME, Value=Cloudera ODBC Driver for Impala
SQL_DRIVER_VER, Value=2.5.2.1002
SQL_DBMS_NAME, Value=TEXT
SQL_DBMS_VER, Value=00.00.0000
SQL_DRIVER_ODBC_VER, Value=03.52
SQL_ODBC_VER, Value=03.52

Resolving the problem

You can try disabling quoted identifiers by adding the following sections to cogdmod.ini file:


[Exceptions Delimiters DRIVER:Cloudera ODBC Driver for Impala]
; Entries added here affect all ODBC connections.
; For this reason overwrites should be added to subsections only.
; The entries below show the ODBC defaults.
Catalog_Delimiter=
Schema_Delimiter=
Table_Delimiter=
Column_Delimiter=
Procedure_Delimiter=
Wholename_Delimiter=

[DRIVER:Cloudera ODBC Driver for Impala]
SQL_IDENTIFIER_QUOTE_CHAR=""

Related information

KB 1370490 ODBC trace

Document information


More support for:

Cognos Business Intelligence
Report Studio

Software version:

10.2.1

Operating system(s):

Windows

Software edition:

All Editions

Reference #:

1651307

Modified date:

2016-05-23

Translate my page

Content navigation