Error creating a table in redshift
drewspencerpearson opened this issue · 3 comments
Expected Behaviour
the pandas_to_redshift function successfully saves a pandas df in S3, then it should successfully create a table in redshift, but that is not the case.
Actual Behaviour
After successful creation of the csv in S3 the funtion pandas_to_redshift gives an error in the "CREATING A TABLE IN REDSHIFT" section. Specifically, "syntax error at or near "varchar" "
Steps to reproduce (If possible)
a screen shot of the issue:
Hi @drewspencerpearson. At a glance, it looks like your DataFrame has columns which contain spaces in the names. This is not a situation which is currently handled by pandas_redshift. Please leave this issue open, but for now a quick solution would be to remove or replace the the spaces in your column names before writing the DataFrame to redshift.
This is fixed as of release 1.1.3.
I had the same issue with "." in column names in release 2.0.1. When I replaced the "." the issue is resolved.