I am trying to upload a dataframe into an existing table in snowflake cloud. Here is the dataframe:
columns_df.head()
Now when using the to_sql()
from pandas to append data into existing table:
columns_df.to_sql('survey_metadata_column_names', index=False, index_label=None, con=conn, schema='PUBLIC', if_exists='append', chunksize=300)
I received the following error:
DatabaseError: Execution failed on sql 'SELECT name FROM sqlite_master WHERE type='table' AND name=?;': not all arguments converted during string formatting
TypeError: not all arguments converted during string formatting
Some of the column names contains dashes and underscores.