-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Bug] Disabled models are logged as "does not exist" #4383
Comments
@randypitcherii Thanks for opening! We do raise different error messages, during parsing, if you try to
This distinction would be much trickier to make during node selection. We've already constructed the DAG, and left disabled nodes out of it; we select nodes from that DAG; there's no good way to tell whether a node is missing from the DAG because it's been disabled, or because it never existed in the first place. So, we try to raise a more helpful warning that indicates both possibilities. Here's the message I see when I select a model that is missing from the DAG, either because it's disabled or because it doesn't exist:
The intent behind the inclusion of "try checking your model configs" is to indicate that a model might be configured with
Note that this is a "warn"-level log event, meaning that it will raise an error in "warning-as-errors" mode:
|
@jtcohen6 is there any appetite for adding some sort of The use case was raised by a customer where they have multiple jobs that they orchestrate outside of dbt Cloud (lets say there's a job A that runs and then upon success, a job B is triggered). Now someone might accidentally have a typo of the model name in job A (e.g. In the context of a single Here are some of the things I'm thinking about of how to achieve the above without requiring any change to dbt-core or dbt Cloud.
|
@jeremyyeo Thanks for sharing that context!
I think this is the thing. I don't think we should try adding separate flags for each individual warning. I do think the pattern here should look like:
Such a system isn't exactly possible today (I'll explain why below) — but does that at least sound like the right direction, to achieve the sort of fine-grained control we're looking for? Ok, here's the catch: Unfortunately, the dbt-core/core/dbt/exceptions.py Lines 1011 to 1015 in 8f50eee
That is, all log events fed through
|
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers. |
Is there an existing issue for this?
Current Behavior
When performing a
dbt run -s my_model
whenmy_model
is configured withenabled=False
, dbt reports that the model doesn't exist rather than indicating it is disabled.Expected Behavior
The expected behavior is for dbt to differentiate error messages between missing models and disabled models.
Steps To Reproduce
enabled=False
dbt run -s my_model
Relevant log output
No response
Environment
What database are you using dbt with?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: