I am trying to connect to teradata server to load the data from pandas DataFrame
to teradata
using the following create engine
import teradata
import teradatasql
from sqlalchemy import create_engine
import sqlalchemy_teradata
import pandas as pd
engine=create_engine("teradata://user:pwd@host/DataBase")
Error:
NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:teradata
I would appreciate your help. Can somebody help?
I would first check to make sure both of these packages were installed correctly and are imported successfully:
from sqlalchemy import create_engine
import sqlalchemy_teradata
If so, I would restart your Python session - I was getting the same error as you and it finally went away after rebooting.
If you are still running into issues, try this string:
td_engine=create_engine('teradata://'+uid+':'+password+'@'+server+'/'+db+'?driver='+driver)