跳转至

🕸️ Redshift

二、API 接口说明

alcedo_pdbc.datawarehouse.Redshift

Bases: alcedo_pdbc.sql.sql_utils.DBConnector

Functions

alcedo_pdbc.datawarehouse.Redshift.write_dataframe(df, table_name, database=None, if_exists='append', index=False) method descriptor

Redshift.write_dataframe(self, df, str table_name: str, str database: str = None, str if_exists: str = 'append', index=False)

Takes dataframe, table name as arguments and write the dataframe to Redshift

Parameters:

Name Type Description Default
df DataFrame

Dataframe which need to be loaded

required
table_name str

table name

required
database str

database name. Defaults to None.

None
if_exists str

operation to do if the table exists. Defaults to 'append'.

'append'
index bool

Write DataFrame index as a column. Defaults to False.

False