-
Notifications
You must be signed in to change notification settings - Fork 60
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
Redshift create table with backup option #18
Comments
hey @krishbox - I'd be happy for dbt to support a setting like this! If you're interested in sending through a PR, that would definitely be welcomed :) Before you do that though, can we sketch out what the config interface would look like? Curious to hear what you have in mind |
Hi @drewbanin, I hope I have understood your question correctly! I was thinking of having something like this in
I'm not entirely happy with the name of the option, suggestions welcome, other candidates:
|
Cool - Feel free to send through a PR for this when you can! Let us know if there's anything we can help out with :) |
If no one has jumped on this yet, I would be interested in working on this as a first-time contributor. Let me know if this sounds good. I will also have some more specific questions next week, but for now I just wanted to say I'm interested in working on this. |
Sounds good @dlb8685, thank you! |
I think I'm off to a good start on getting tests to run and setting up the repo locally. I'm getting a little stuck on finding the relevant file(s) that convert models yaml to compiled SQL. Are there a couple of pointers on which part of the code base to focus in on? |
@dlb8685 It sounds like the change involves a new config option, templated into the I believe the relevant bits of code for that change would be the And the |
@jtcohen6 Thanks for the help, it definitely made things easier for me. I do think I have a solution now that is working on a little test project I have. One last thing is, I'm trying to find where in the test files I could add an integration test for this. It looks like this may be the right general area? But I can't figure out where, if at all, there is a project configuration where I can add the |
@dlb8685 Glad to hear it! The
As a final check, is there a system table that we can query, to confirm that the table has been opted out of backup? |
@dlb8685 I think the code changes in this repo will be just about identical to the ones you've made in dbt-labs/dbt-core#3221 Pointers:
|
@jtcohen6 I have some changes now in my local fork. Can you remind me which branch in dbt-redshift I should create a PR into? I'm assuming not |
@dlb8685 |
Describe the feature
The
CREATE TABLE
statement in Redshift has a configuration option that controls whether or not the table should be included in automated and manual cluster snapshots. The default setting for this option isYES
. At present this is not configurable in DBT and the default is used for all table and incremental materialisations.By allowing configuration of this parameter in DBT models we can save processing time when creating snapshots and restoring from snapshots and to reduce storage space on Amazon Simple Storage Service.
Describe alternatives you've considered
There is no way to get around this except to turn off automated snapshots at a cluster level.
Additional context
This feature is Redshift specific. The feature is similar but not exactly the same as Snowflakes
TRANSIENT
table.Who will this benefit?
This will benefit all DBT users who use Redshift and who want to control storage costs and to speed up snapshot creation and restores.
P.S. If you think this is worthwhile and in keeping with DBT's principles, then I would love to work on this issue with a PR.
The text was updated successfully, but these errors were encountered: