Maria Nazari
Maria Nazari

Reputation: 690

Save Python data-frame as Table in Teradata

I want to pull a table from Teradata as a Python data-frame. I know how to accomplish this step. Next I want to run algorithms on the data to transform it however I want. Once I am done with manipulating the data in Python, I want the resulting data-frame to be saved as a new table in Teradata so that I can perform joins with other tables in the database. My question is how do I save a python data-frame back into a database, I would like to do this inside of python using a script.

Upvotes: 5

Views: 5959

Answers (2)

hhoeck
hhoeck

Reputation: 371

although I never performed it by my self, but in theory each of following looks promising:

Upvotes: 2

Ghasem Naddaf
Ghasem Naddaf

Reputation: 862

One option is to use fastterdata, specifically the load_table function:

load_table(abs_path, df, table_name, env, db, connector = "teradata", clear_table=True)

Loads a pandas dataframe from memory into teradata via the optimized fastload functionality.

Note that you need to install requirements listed here.

Upvotes: 3

Related Questions