JohnOmernik / sqlalchemy-drill

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

Add pyodbc backend #40

Closed idzikovsky closed 4 years ago

idzikovsky commented 4 years ago

Here's an ability to connect to Drill via ODBC using pyodbc module.

I've decided not to convert username and password parameters returned from create_connect_args to UID and PWD respectively and in general not to convert URL parameters (username:password@hostname:port) to valid Drill ODBC properties to prevent any misinterpretation of parameters in connection strings like drill+odbc://myName:myPWD@localhost:31010/?UID=notMyName. And I've added note on this in README.md. But I can implement it, if you find it useful.

Testing done I was able to run python test/test_odbc.py successfully on CentOS/Ubuntu machines. Drill was configured to authenticate users with PAM and SSL was disabled, plus I've created user admin with password password on machine with Drill server . Also, I was able to connect from Python shell to Drill with MapRSASL.

cgivre commented 4 years ago

+1 LGTM.
@JohnOmernik Can you please commit this?