Reputation: 315
I am using teradatasql package which native solution of Teradata as a connector between python and Teradata to load data from DB. However, I want to insert data frames I created in python back to DB. Is it possible to write data frames to the database by using teradatasql package?
Thanks
Upvotes: 1
Views: 3148
Reputation: 450
SQLAlchemy provides the linkage between pandas dataframes and a SQL database.
Typically, you would use the pandas dataframe to_sql
method to insert the contents of a dataframe into a table in the database:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_sql.html
We offer a SQLAlchemy dialect for the Teradata SQL Driver for Python:
https://pypi.org/project/teradatasqlalchemy/
You can install it with: pip install teradatasqlalchemy
Upvotes: 1