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

Add modules and tracking info to the configuration parsing context (#1320) #1441

Merged
merged 1 commit into from
May 7, 2019

Conversation

beckjake
Copy link
Contributor

@beckjake beckjake commented May 3, 2019

Fixes #1320

Add modules and tracking info to the config parsing context, and an associated test.

You can now do neat things like:

target-path: "target_{{ modules.datetime.datetime.utcnow().strftime('%Y%m%dT%H%M%S') }}"

in your dbt_project.yml

Add a test to make sure setting the target path works properly
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.

LGTM!

'env_var': env_var,
'modules': get_context_modules(),
}
context['var'] = Var(None, context, cli_vars)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably one of those things we'll want to consider when describing (and overhauling) the compilation context -- it's kind of wild that we need to provide a context to build the context... Obviously ok for now though

@beckjake beckjake merged commit 715155a into dev/wilt-chamberlain May 7, 2019
@beckjake beckjake deleted the feature/dynamic-target-paths branch May 7, 2019 14:00
@octocat1000
Copy link

This feature is really useful. A mention in the docs would be appreciated as it took a bit of googling to find this issue in order to find out that it exists.

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

Successfully merging this pull request may close these issues.

ability to set target-path to a dynamic value
3 participants