Pandas dataframe to Redshift psql table

2019-07-17 15:45发布

I'm trying to keep inserting data into Redshift table. This method often worked for me:

test_df.to_sql('MY_table', engine, index=False, if_exists ='append')

As you can see, I have already used 'append' for new insertion. But today redshift kept giving me error saying:

ProgrammingError: (psycopg2.ProgrammingError) Relation "MY_table" already exists

Do you know why?

0条回答
登录 后发表回答