Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom_sql fails for Redshift databases #372

Closed
elsander opened this issue Sep 25, 2018 · 2 comments
Closed

custom_sql fails for Redshift databases #372

elsander opened this issue Sep 25, 2018 · 2 comments

Comments

@elsander
Copy link
Contributor

Redshift unfortunately does not have functionality for IF NOT EXISTS, so the temporary table creation fails when passing custom sql to a Redshift SQLAlchemy engine. It seems like the options are here are to introspect the engine and special-case Redshift (seems harder to maintain), to remove the IF NOT EXISTS for everyone and let the custom sql fail if the table exists (I think I'd expect this behavior as a user anyway), or to not support custom_sql for Redshift.

@elsander
Copy link
Contributor Author

If the maintainers have thoughts on which approach makes the most sense for the library, I'm happy to take a stab at this next week as well. I'm hoping to make some contributions to this library for Hacktoberfest :)

@ccnobbli
Copy link
Contributor

Cool! I haven't looked into it but the second option makes sense to me. @jpcampb2 is the author and resident expert on the SQLAlchemy implementations.

jpcampb2 pushed a commit that referenced this issue Oct 11, 2018
Add Redshift compatibility when creating temporary tables (#372)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants