I'm trying to run Hive queries via Presto using SQLAlchemy. It uses LDAP authentication but I'm missing something in the connection string.
from sqlalchemy.engine import create_engine
conn_string = 'presto://' + user + ':' + passw + '@' + host + ':' + port + db \
+ ", connect_args={'auth':LDAP}"
eng = create_engine(conn_string)
I'm getting an error that says:
Protocol must be https when passing a password
I've seen some discussion about this when searching but don't see a clear resolution. I've tried many combinations with and without the port, db, etc. Do you know how to do it? Thank you!
I ended up using a different library that worked:
import prestodb
conn=prestodb.dbapi.connect(
host=host,
port=port,
user=user,
catalog='db_name',
schema='my_schema',
http_scheme='https',
auth=prestodb.auth.BasicAuthentication(user, passw)
)
Then I was able to retrieve the results and put into a dataframe. So no need for SQLAlchemy. It seems unnecessarily complicated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With