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

dbt contexts #1503

Closed
beckjake opened this issue Jun 4, 2019 · 1 comment · Fixed by #2085
Closed

dbt contexts #1503

beckjake opened this issue Jun 4, 2019 · 1 comment · Fixed by #2085

Comments

@beckjake
Copy link
Contributor

beckjake commented Jun 4, 2019

Related to #1255

Feature

Implement a proof-of-concept for what should be in dbt's rendering contexts

Feature description

I've written a basic idea of what dbt contexts could be like here: https://gist.github.com/beckjake/95117972e370adbe4798f0818b052cc7

For this issue, just implement through the schema.yml section to get an idea for how it would work, and decide if we should go forward with applying it to macros/models/etc.

Consider: it would be nice if we supplied the target to all future contexts as soon as we finished parsing the profile field of dbt_project.yml. This requires some complicated juggling of the parse/render order, but the target is both very useful and can be statically determined, so it's probably worth it.

As part of the issue, also generate some sort of automated description of what fields are rendered in what contexts.

Who will this benefit?

This will make it easier to document the behavior of contexts, which complicated, very unintuitive, and not well-documented right now. This would be an upgrade to just complicated and a little unintuitive.

@beckjake beckjake added this to the Louisa May Alcott milestone Jun 4, 2019
@tayloramurphy
Copy link

This would be great for a use-case I'm working on. I'm trying to implement partitioning as natively as possible and one approach I was toying with was passing in a macro to the snowplow package. Unfortunately, referencing a macro name for schema is not compile-worthy.

Also, lol at this:

This would be an upgrade to just complicated and a little unintuitive.

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 a pull request may close this issue.

4 participants