Hi. I'm using Anaconda Python 3.8.3, trying to use SQLAlchemy to connect to Teradata but it's not working. I've tried several ways but no luck.
In "pip list" I have
SQLAlchemy
sqlalchemy-teradata
teradata
teradatasql
teradatasqlalchemy
Currently config is like this:
import sqlalchemy
conn_string = 'teradata://' + user + ':' + passw + '@' + host + '/?logmech=LDAP'
eng = sqlalchemy.create_engine(conn_string)
sql = 'select top 10 * from some_table'
result = eng.execute(sql)
The error I get is:
DatabaseError: (teradata.api.DatabaseError) (210, '[28000] [Teradata][ODBC Teradata Driver][Teradata Database] (210) The UserId, Password or Account is invalid. FailCode = -8017')
But by now it's certain that there's no problem with my account credentials. I can connect to the same DB with other Python connection methods (pyodbc) and also DBeaver. So I think this is a driver issue?
I posted here but didn't get anything helpful:
Please help if you can. The reason I want to use sqlalchemy is to use df.to_sql to insert to a table in Teradata. It seems easier than with pyodbc.
Thanks in advance.