can't connect to Teradata - "The UserId, Password or Account is invalid"

578 views
Skip to first unread message

Chuck Pedro

unread,
Aug 19, 2020, 11:23:53 AM8/19/20
to sqlalchemy
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. 

Jonathan Vanasco

unread,
Aug 19, 2020, 3:38:37 PM8/19/20
to sqlalchemy
You will have better luck asking for help from the people who write/maintain the Teradata dialect.  They list a gitter room here: https://github.com/Teradata/sqlalchemy-teradata

According to a posting on gitter (https://gitter.im/sandan/sqlalchemy-teradata), it looks like that package is being deprecated in favor of an official client https://pypi.org/project/teradatasqlalchemy/


Reply all
Reply to author
Forward
0 new messages