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

snapshot config blocks (#1613) #1759

Merged
merged 2 commits into from Sep 18, 2019

Conversation

beckjake
Copy link
Contributor

Fixes #1613

Snapshots can now be configured via {{ config(...) }}
Added tests to exercise it

Snapshots can now be configured via {{ config(...) }}
Added tests that exercise that
Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, this looks great! Really amazing that it's +110 LOC including tests.

I left one comment here about snapshot pre/post hooks. I think those will be a good thing to support, and I think we only need to change one materialization file. Let me know what you think about that.

@@ -23,7 +23,7 @@ def _is_hook_or_model_vars_path(keypath):
if first in {'on-run-start', 'on-run-end'}:
return True
# models have two things to avoid
if first in {'seeds', 'models'}:
if first in {'seeds', 'models', 'snapshots'}:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably add support for pre- and post- hooks in snapshots here

Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! The hooks code works super well. Ship it!

@beckjake beckjake merged commit 7a305ca into dev/louisa-may-alcott Sep 18, 2019
@beckjake beckjake deleted the feature/snapshot-config-block branch October 14, 2019 23:00
@beckjake beckjake restored the feature/snapshot-config-block branch October 14, 2019 23:00
@beckjake beckjake deleted the feature/snapshot-config-block branch October 14, 2019 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support snapshot configs in dbt_project.yml
2 participants