Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding Problem? #28

Open
ewal31 opened this issue Aug 6, 2019 · 1 comment
Open

Encoding Problem? #28

ewal31 opened this issue Aug 6, 2019 · 1 comment

Comments

@ewal31
Copy link

ewal31 commented Aug 6, 2019

Just wondering if you have any thoughts on what might be causing this problem. I am trying to use an impala odbc driver. Perhaps it is a driver problem

`connection :: IO Connection
connection = connect $ pack $ connString host port schema
where
connString host port schema =
"Driver=Impala;Host=" ++ host ++ ";Port=" ++ port ++ ";Schema=" ++ schema

test :: IO ()
test = do
conn <- connection
rows <- query conn "select * from article_base_open" :: IO [[Value]]
print rows
close conn
`

*** Exception: UnsuccessfulReturnCode "odbc_SQLExecDirectW" (-1) "[Cloudera][ImpalaODBC] (360) Syntax error occurred during query execution: [HY000] : AnalysisException: Syntax error in line 1:\n\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533n\65533B\65533\32717\SOH\SOH\65533B\65533B\65533\32717\65533B\65533\n^\nEncountered: Unexpected character\nExpected: ALTER, COMPUTE, CREATE, DESCRIBE, DROP, EXPLAIN, GRANT, INSERT, INVALIDATE, LOAD, REFRESH, REVOKE, SELECT, SET, SHOW, USE, VALUES, WITH\n\nCAUSED BY: Exception: Syntax error\n[Cloudera][ImpalaODBC] (360) Syntax error occurred during query execution: [HY000] : AnalysisException: Syntax error in line 1:\n\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533\65533n\65533B\65533\32717\SOH\SOH\65533B\65533B\65533\32717\65533B\65533\n^\nEncountered: Unexpected character\nExpected: ALTER, COMPUTE, CREATE, DESCRIBE, DROP, EXPLAIN, GRANT, INSERT, INVALIDATE, LOAD, REFRESH, REVOKE, SELECT, SET, SHOW, USE, VALUES, WITH\n\nCAUSED BY: Exception: Syntax error\nC"

@chrisdone
Copy link
Contributor

It does appear to be driver-related -- perhaps it doesn't support UTF-16? That's what the Microsoft driver uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants