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

[CT-627] [Feature] Allow references to input parameters, specifically for dependency handling #5231

Closed
1 task done
smitsrr opened this issue May 11, 2022 · 1 comment
Closed
1 task done
Labels
enhancement New feature or request

Comments

@smitsrr
Copy link

smitsrr commented May 11, 2022

Is this your first time opening an issue?

Describe the Feature

When dbt projects become large, models are used in many places, and even small failures can bring down business critical portions of the DAG.

To isolate risk, it would be useful if a reference (or source) could take a parameter for what to do if that model fails. Arguments could include, 'proceed', 'skip', where 'skip' is the current default behavior.

For instance, we have a minor ref table that failed and it caused our main fact to fail. However, the little ref is not critical to the fact table, and we would be happy to proceed without that data. However, that ref table is critical to another dimension, so we would want that DAG to skip.

Describe alternatives you've considered

I've considered the tests and built DAG alternatives, but that doesn't allow customization across portions of the DAG.

Who will this benefit?

This will benefit users who have large projects with complex dependencies.

Are you interested in contributing this feature?

No response

Anything else?

No response

@smitsrr smitsrr added enhancement New feature or request triage labels May 11, 2022
@github-actions github-actions bot changed the title [Feature] Allow references to input parameters, specifically for dependency handling [CT-627] [Feature] Allow references to input parameters, specifically for dependency handling May 11, 2022
@jtcohen6 jtcohen6 self-assigned this May 11, 2022
@jtcohen6
Copy link
Contributor

@smitsrr There's been a lot of new and recent conversation in #2142, including a comment I see from you! Prompted by those comments, and also your thoughtful issue here, I've just reopened it and left a new comment: #2142 (comment)

One thing I mentioned there:

I'm hesitant to support defining this configuration for the full matrix of parent-child relationships, as I think that can get unwieldy very quickly.

As the person writing the model, I see the intuitive appeal of being able to configure this right within the ref() / source() specification. When these models are actually running in production, I'm worried about the ballooning complexity that comes from so many different behaviors, which would require jumping back through the dbt source code to understand the cause.

I'd much prefer to reason clearly about a model that MUST block downstream builds (if we choose to configure this on the parent), or a model that MUST run (if we choose to configure this the child).

small failures can bring down business critical portions of the DAG

I'd push back slightly on "bring down." One important feature of dbt's modeling paradigm is that, in almost all cases, model builds ought to be idempotent and atomic. (There are precious few exceptions: snapshots; --full-refresh on certain adapters that don't support create or replace or rename-swapping.) If an upstream model build fails, the database views and tables built by downstream models do not go away. They do get stale, over time, if the upstream model continues to fail without recourse. Hopefully that's an unusual occasion, and one where a manual intervention is warranted, to run the critical models while excluding the failing non-critical ones.

I'm definitely open to discussing this more. For now, I see this idea as very closely related to the one in #2142, so I'm going to close this issue to keep the conversation centralized over there.

@jtcohen6 jtcohen6 removed the triage label May 13, 2022
@jtcohen6 jtcohen6 removed their assignment May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants