Open coastlines opened 1 year ago
This should be a pretty easy fix, once we figure out what the API should be. I like @coastlines 's suggestions about allowing different options. It should be as easy as adding the right modifier to the end of the query here: https://github.com/move-coop/parsons/blob/main/parsons/databases/redshift/rs_table_utilities.py#L271
How does this relate (if at all) to #818 (with PR #819)?
The Redshift.duplicate_table() function has an optional parameter that allows the original table to be dropped after creating the duplicate table. This is a very helpful feature, but specifying 'drop' will result in errors if a table has dependent views.
Ideally, the new options would be: drop-cascade, or a drop-skip-dependent (drop all tables except tables with dependent views).
An interim suggestion is to update the documentation to include a caveat that Redshift functions that have a drop option do not currently account for dependencies, and perhaps include some example code showcasing suggested workarounds.
Priority
Medium