JohnOmernik / sqlalchemy-drill

Apache Drill Dialect for SQL Alchemy
Other
53 stars 35 forks source link

Caravel can't connect #13

Closed cgivre closed 5 years ago

cgivre commented 8 years ago

I'm having trouble getting caravel to connect to drill. I'm using the connection string below:

drill+pyodbc:///Driver=/opt/mapr/drillodbc/lib/64/libmaprdrillodbc64.so;ConnectionType=Direct;Host=localhost;Port=31010;Catalog=DRILL;Schema=dfs.root;AuthenticationType=Basic Authentication;AdvancedProperties=CastAnyToVarchar=true;HandshakeTimeout=5;QueryTimeout=180;TimestampTZDisplayTimezone=utc;ExcludedSchemas=sys,INFORMATION_SCHEMA;NumberOfPrefetchBuffers=5;UID=someuser;PWD=somepass

and here is the error I am receiving in Caravel when I try to test the connection.

ERROR: Traceback (most recent call last):
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/caravel/views.py", line 1029, in testconn
    engine.connect()
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2085, in connect
    return self._connection_cls(self, **kwargs)
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 90, in __init__
    if connection is not None else engine.raw_connection()
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2171, in raw_connection
    self.pool.unique_connection, _connection)
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2141, in _wrap_pool_connect
    return fn()
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/pool.py", line 328, in unique_connection
    return _ConnectionFairy._checkout(self)
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/pool.py", line 766, in _checkout
    fairy = _ConnectionRecord.checkout(pool)
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/pool.py", line 516, in checkout
    rec = pool._do_get()
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/pool.py", line 1045, in _do_get
    c = self._create_connection()
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/pool.py", line 333, in _create_connection
    return _ConnectionRecord(self)
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/pool.py", line 461, in __init__
    self.__connect(first_connect_check=True)
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/pool.py", line 651, in __connect
    connection = pool._invoke_creator(self)
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 105, in connect
    return dialect.connect(*cargs, **cparams)
  File "/home/merlinuser/anaconda3/envs/py2k/lib/python2.7/site-packages/sqlalchemy_drill-0.8.dev0-py2.7.egg/sqlalchemy_drill/base.py", line 162, in connect
    return self.dbapi.connect(autocommit=True, *cargs, **cparams)
TypeError: connect() got multiple values for keyword argument 'autocommit'

I've run pyodbc_example.py and that executes without error. I suspect that the connection string is not correct, but I'm not really sure how to proceed. Thanks for any assistance.