问题
Hi I am attempting to use sqlalchemy-teradata
to write a pandas dataframe into a Teradata table. Here is the code I am using:
from sqlalchemy import create_engine
import sqlalchemy_teradata
td_engine=create_engine('teradata://'+uid+':'+password+'@'+host+':22/')
That comes back with the error above. I have also tried this code as well as I've seen this elsewhere on stackoverflow:
engine=create_engine('teradata://'+ uid +':' + password + '@'+ host + '/' + '?authentication=LDAP')
I have installed all of the following packages: sqlalchemy
, sqlalchemy-teradata
, and teradatasqlalchemy
.
Has anyone seen this error before? Any help would be much appreciated!
回答1:
I would first of all check if the packages are installed correctly:
$ python
>>> import teradata
>>> import sqlalchemy_teradata
Does this give any error messages?
Also, I believe you only need the sqlalchemy-teradata
package, not teradatasqlalchemy
.
来源:https://stackoverflow.com/questions/52960393/nosuchmoduleerror-cant-load-plugin-sqlalchemy-dialectsteradata