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: 

https://stackoverflow.com/questions/63476810/userid-password-or-account-is-invalid-for-sqlalchemy-teradata?noredirect=1#comment112249505_63476810
 

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. 

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/13e78d8d-6e24-4380-a29a-b051b4510d9an%40googlegroups.com.

Reply via email to