-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fix: Create table statement parameter ordering when configured with backup & dist/sort #63
Conversation
set BACKUP parameter before dist/sort keys
updated changelog
@SMeltser if you could update your local branch and repush up to test with most recent changes to main we should be able to get this approved. |
👍 To what Matt said Since this was let through before because we didn't have a test for this case, would you mind adding a test or two for queries which include backup and various other Redshift options? Not to send you out into deep end by yourself. Here's the class or thereabouts a test has both the backup option and a dist key/sort key should go! We'll be happy to lend extra support in making sure this behavior gets recorded as a regression test. |
Will do ASAP! Thank you for the feedback @McKnight-42 @VersusFacit |
@McKnight-42 @VersusFacit Just completed the test updates. Open to any and all feedback you have regarding the setup. I incorporated a conditional flow if the backup param is expected to ensure that the ordering of parameters is valid when dist/sortkey's are supplied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, this is great! Thanks for taking a stab at this and following up. We're so close to finishing this up.
Just two minor comments. I really like the trick of checking things by index in the over DDL string. Quality way to ensure there's a proper ordering at play.
tests/integration/backup_table_tests/test_backup_table_option.py
Outdated
Show resolved
Hide resolved
tests/integration/backup_table_tests/test_backup_table_option.py
Outdated
Show resolved
Hide resolved
thank you all for working on this fix. This may be a bit off topic but when can we expect 1.0.1 to be released? I'm really looking forward to using this. |
@SMeltser We had a few bugs crop up over the last week or so that are responsible for unit tests failures in your logs. Thankfully, we've already fixed them. Merging the adapter root branch into this project will resolve them and get you green, at which point I'll (finally) approve for. @will-peloton As soon as we get this green, I think we can merge it. As for 1.0.1 of this adapter (if that's what you mean; please correct me if I'm misreading), we're very much in a 'keeping the lights on' mode right now. That said, I'll report back to the team a desire to see that initiative pushed through. |
Dbt labs main merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* backport of pr #63 * Empty-Commit * removing unneeded changelog entry Co-authored-by: Steven Meltser <[email protected]>
…ackup & dist/sort (dbt-labs#63) * set BACKUP parameter before dist/sort keys * updated changelog * added test v1 * Finalize backup tests * update tests
resolves #60
Description
This PR corrects the parameter ordering of the table creation statement to accommodate when a model is configured with both a BACKUP parameter as well as an accompanying DIST/SORT key.
Checklist
CHANGELOG.md
and added information about my change to the "dbt-redshift next" section.