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?