I'm writing a script to run a series of queries from a database and do some analysis on the data returned using the Teradata Python Module.
The environment I want to access uses LDAP authentication. Does anyone have any guidance on what I need to do to my script to access that environment?
I'm currently getting the error:
teradata.api.DatabaseError: (8017, '[28000] [Teradata][ODBC Teradata Driver][Teradata Database] The UserId, Password or Account is invalid. ')
However I can log into Teradata with my credentials so I'm not sure what I'm messing up on my UdaExec files...
If you are using the Teradata Python module with ODBC driver to connect to Teradata, you can use LDAP authentication by specifying the option authentication=LDAP in the connect method. I have seen this to work with Teradata Database ODBC Driver 16.10 and should mostly work in ODBC Driver version 15.10 as well (not tested).
Example:
import teradata
udaExec = teradata.UdaExec(appName="MyApp", version="1.0", logConsole=True)
session = udaExec.connect(method="odbc", system="<TD-SERVER>", username="<LDAP-USER>", password="<LDAP-PASSWD>", authentication="LDAP")
for row in session.execute("SELECT GetQueryBand()"):
print(row)
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