Could someone help me with the below error while connecting to Teradata from my Python environment.
I'm using ODBC driver method and I've tried all the below existing methods to connect but no luck.
Note: if you are using windows, you can directly use these methods, however the problem comes when you are on MAC OS (not for all though)
USING TERADATA Module and SQL Alchemy.
import teradata
import pyodbc
server='111.00.00.00'
username = 'user'
password = 'pwd'
udaExec = teradata.UdaExec(appName="test", version="1.0",
logConsole=True)
ndw_con = udaExec.connect(method = 'odbc',authentication = "LDAP",
system=server, username=username, password=password)
# SQL ALCHEMY from teradata
from sqlalchemy import create_engine
user = 'user'
pwd = 'pwd'
host = '1'11.00.00.00'
td_engine = create_engine('teradata://'+user+':'+pwd+'@'+host+':22/' )
result = td_engine.execute('select top 100 * from temp.sampledata')
# USING PYODBC: the below code gave me a new error saying ('01000', " [01000] [unixODBC][Driver Manager]Can't open lib 'Teradata' : file not found (0) (SQLDriverConnect)")
import pyodbc
td_conn = pyodbc.connect('DRIVER= .
{Teradata};DBCName='+server+';UID='+username+';PWD='+ password,
automcommit=True)
cursor = td_conn.cursor()
Regardless, I was unable to made a connection to teradata, could someone let me know what's going on here and how to fix this issue once for all.
Thanks!