Pandas dataframe to Redshift psql table

人盡茶涼 提交于 2019-12-11 03:28:27

问题


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?

来源:https://stackoverflow.com/questions/51312684/pandas-dataframe-to-redshift-psql-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!