|Subject:||Problems using Impala ODBC library with Perl|
Considering that we have a bunch of scientists/programmers here that still use Perl and we're starting to use Cloudera CDH I thought I'd try using DBD::ODBC with Impala's ODBC library. Unfortunately I didn't get very far. First it didn't pick up the driver manager shared library properly. I'm using unixODBC (64bit) on CentOS and it defaulted to linking with -lodbc instead of -lodbc64. Quick change of the Makefile and it compiled. The next problem I encountered has to do with AutoCommit -- Impala doesn't support transactions and appears to be returning an error when SQLSetConnectAttr()is called in post_connect() to turn on AutoCommit. There doesn't seem to be a way of avoiding this call and a Google search turned up two links with similar problems: 1) A post on the impala-user Google Groups where a user was having a similar issue using an ETL tool, IBM datastage, which is also expecting to be able to set autocommit. 2) A post on perlmonks about drivers not supporting autocommit and dbi requiring it. Commenting out the autocommit setting it then goes down in flames when it SQLGetInfo(SQL_DRIVER_ODBC_VER), with tracing showing that the connection is closed. Not sure where to take this next to try to get it working. Anyhow I don't have a solution for this yet but I thought I'd share.