I'm trying to extract some tables from a database using Python script I created...
import jaydebeapi as jdbc
import pandas.io.sql as psql
import pandas
import getpass
import yaml
p = yaml.load(file("/Users/glassjawed/.TD"))
# Contains password
c = jdbc.connect('com.teradata.jdbc.TeraDriver'
,['jdbc:teradata://******.***.***.com','glassjawed',p]
,['~/terajdbc4.jar','~/tdgssconfig.jar'])
# read in the table we want
df = psql.read_sql('SELECT TOP 10 user_id FROM store_users',c)
print(pandas.DataFrame.head(df))
print(type(df))
but I'm running into the following error.
File "EPNconnect.py", line 11, in <module>
,['~/terajdbc4.jar','~/tdgssconfig.jar'])
File "/usr/lib/python2.7/dist-packages/jaydebeapi/__init__.py", line 359, in connect
jconn = _jdbc_connect(jclassname, jars, libs, *driver_args)
File "/usr/lib/python2.7/dist-packages/jaydebeapi/__init__.py", line 182, in _jdbc_connect_jpype
jpype.JClass(jclassname)
File "/usr/lib/python2.7/dist-packages/JPype1-0.6.1-py2.7-linux-x86_64.egg/jpype/_jclass.py", line 55, in JClass
raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
jpype._jexception.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class com.teradata.jdbc.TeraDriver not found
I installed the latest jar files and I'm still getting this error. I don't know how to work around this. Help?