<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Getting improper &amp;quot;Unexpected character&amp;quot; using Cloudera ODBC for Impala in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-improper-quot-Unexpected-character-quot-using/m-p/67494#M78549</link>
    <description>&lt;P&gt;Are there shortcomings with the ODBC driver around parameters?&amp;nbsp; Can you help me fix a big problem I'm having?&amp;nbsp; I'm passing a simple string, like "A123456", into a query with a single parameter.&lt;BR /&gt;&lt;BR /&gt;I've simplified my query as much as possible to avoid confusion.&amp;nbsp; I get the "unexpected character" error on this query over ODBC using Cloudera ODBC driver 64-bit 2.05.41.1029 for Windows.&amp;nbsp; (My actual query I want to run is much larger but the same in its essence.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;with nextMatchId as (
    select min(match_id) as match_id
    from userTable
    where user_id = ?)
select c.*
from candidateTable c
join nextMatchId on nextMatchId.match_id=c.match_id&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Supplying a Varchar parameter like "A123456" and running it gives me:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ERROR &lt;SPAN class="error"&gt;[HY000]&lt;/SPAN&gt; &lt;SPAN class="error"&gt;[Cloudera]&lt;/SPAN&gt;&lt;SPAN class="error"&gt;[ImpalaODBC]&lt;/SPAN&gt; (110) Error while executing a query in Impala: &lt;SPAN class="error"&gt;[HY000]&lt;/SPAN&gt; : AnalysisException: Syntax error in line 5:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where user_id = ?&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Encountered: Unexpected character&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Expected: CASE, CAST, DEFAULT, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, REPLACE, TRUNCATE, TRUE, IDENTIFIER&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I get the same error when I use a subquery instead of WITH.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to run this well using Hue and supplying the literal value instead of the "?".&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 13:15:16 GMT</pubDate>
    <dc:creator>Locarno</dc:creator>
    <dc:date>2022-09-16T13:15:16Z</dc:date>
    <item>
      <title>Getting improper "Unexpected character" using Cloudera ODBC for Impala</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-improper-quot-Unexpected-character-quot-using/m-p/67494#M78549</link>
      <description>&lt;P&gt;Are there shortcomings with the ODBC driver around parameters?&amp;nbsp; Can you help me fix a big problem I'm having?&amp;nbsp; I'm passing a simple string, like "A123456", into a query with a single parameter.&lt;BR /&gt;&lt;BR /&gt;I've simplified my query as much as possible to avoid confusion.&amp;nbsp; I get the "unexpected character" error on this query over ODBC using Cloudera ODBC driver 64-bit 2.05.41.1029 for Windows.&amp;nbsp; (My actual query I want to run is much larger but the same in its essence.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;with nextMatchId as (
    select min(match_id) as match_id
    from userTable
    where user_id = ?)
select c.*
from candidateTable c
join nextMatchId on nextMatchId.match_id=c.match_id&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Supplying a Varchar parameter like "A123456" and running it gives me:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ERROR &lt;SPAN class="error"&gt;[HY000]&lt;/SPAN&gt; &lt;SPAN class="error"&gt;[Cloudera]&lt;/SPAN&gt;&lt;SPAN class="error"&gt;[ImpalaODBC]&lt;/SPAN&gt; (110) Error while executing a query in Impala: &lt;SPAN class="error"&gt;[HY000]&lt;/SPAN&gt; : AnalysisException: Syntax error in line 5:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; where user_id = ?&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Encountered: Unexpected character&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Expected: CASE, CAST, DEFAULT, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, REPLACE, TRUNCATE, TRUE, IDENTIFIER&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I get the same error when I use a subquery instead of WITH.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to run this well using Hue and supplying the literal value instead of the "?".&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:15:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-improper-quot-Unexpected-character-quot-using/m-p/67494#M78549</guid>
      <dc:creator>Locarno</dc:creator>
      <dc:date>2022-09-16T13:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting improper "Unexpected character" using Cloudera ODBC for Impala</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-improper-quot-Unexpected-character-quot-using/m-p/67535#M78550</link>
      <description>&lt;P&gt;I've discovered many other variations tha thave the same issue--for example, moving the parameter "?" placeholder outside the subquery still causes the same "Unexpected character" on the question mark, as though the parameter is not being substituted by the ODBC driver:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;with
    nextMatchGroup as (
        select user_id, min(match_id)
	from userTable
        group by user_id
    ) 
select *
from candidateTable
join nextMatchGroup on nextMatchGroup.match_id=c.match_id
where nextMatchGroup.user_id = ?&lt;/PRE&gt;&lt;P&gt;...gives me the same error. &lt;STRONG&gt;Any ideas how to overcome this apparent failure to substitute?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 May 2018 14:58:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-improper-quot-Unexpected-character-quot-using/m-p/67535#M78550</guid>
      <dc:creator>Locarno</dc:creator>
      <dc:date>2018-05-22T14:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Getting improper "Unexpected character" using Cloudera ODBC for Impala</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-improper-quot-Unexpected-character-quot-using/m-p/67796#M78551</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/27291"&gt;@Locarno&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Please, what kind of params do you want to pass to ther query via ODBC? Where do you do this? and what is the use cas?&lt;BR /&gt;take a look to this link:&lt;BR /&gt;&lt;SPAN&gt;&lt;A href="https://stackoverflow.com/questions/34093083/query-parameters-with-impala-odbc-driver" target="_self"&gt;https://stackoverflow.com/questions/34093083/query-parameters-with-impala-odbc-driver&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 May 2018 17:27:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-improper-quot-Unexpected-character-quot-using/m-p/67796#M78551</guid>
      <dc:creator>AcharkiMed</dc:creator>
      <dc:date>2018-05-31T17:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting improper "Unexpected character" using Cloudera ODBC for Impala</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-improper-quot-Unexpected-character-quot-using/m-p/67798#M78552</link>
      <description>The question mark is a parameter placeholder in ODBC.&lt;BR /&gt;</description>
      <pubDate>Thu, 31 May 2018 17:38:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-improper-quot-Unexpected-character-quot-using/m-p/67798#M78552</guid>
      <dc:creator>Locarno</dc:creator>
      <dc:date>2018-05-31T17:38:35Z</dc:date>
    </item>
  </channel>
</rss>

