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

[Feature] Fail DAG Execution When dbt Nodes or Paths Don’t Exist #1435

Open
1 task
pankajkoti opened this issue Dec 27, 2024 · 0 comments
Open
1 task

[Feature] Fail DAG Execution When dbt Nodes or Paths Don’t Exist #1435

pankajkoti opened this issue Dec 27, 2024 · 0 comments
Labels
area:execution Related to the execution environment/mode, like Docker, Kubernetes, Local, VirtualEnv, etc enhancement New feature or request triage-needed Items need to be reviewed / assigned to milestone

Comments

@pankajkoti
Copy link
Contributor

Description

Currently, when dbt-core is executed with a node name or path that doesn’t exist, it prints "nothing to do" and completes successfully. While this behavior makes sense from a program perspective, it can lead to issues in Cosmos workflows when nodes or paths are misspelled or incorrectly configured.

For instance, consider a dbt DAG structured as follows:

A
 \
  C
  /
 B

If there is a typo in the select command for B, the dbt task for B does nothing, but C continues to run and succeeds. This behavior makes it difficult to identify configuration errors, especially in scenarios where node or tag names change but are not updated consistently across the workflow.

We propose a feature in Cosmos to treat dbt nodes or paths that result in "nothing to do" as a failure. This would ensure that:

  1. Misspelled or missing node names/paths are caught early
  2. DAG executions fail explicitly when critical dependencies are not met, preventing downstream nodes from running

Use case/motivation

This feature would help users:

  • Catch errors arising from renaming or misconfiguring nodes/tags in dbt DAGs
  • Improve reliability and accuracy in workflows where dbt nodes depend on specific upstream tasks. This feature would add robustness to Cosmos-managed dbt workflows by preventing silent errors that could lead to incorrect data processing or reporting

Proposed Solution

  • Introduce an option in Cosmos to detect and fail tasks where dbt prints "nothing to do"
  • Provide detailed error messages in the logs indicating the problematic node or path

Related issues

No response

Are you willing to submit a PR?

  • Yes, I am willing to submit a PR!
@pankajkoti pankajkoti added enhancement New feature or request triage-needed Items need to be reviewed / assigned to milestone labels Dec 27, 2024
@dosubot dosubot bot added the area:execution Related to the execution environment/mode, like Docker, Kubernetes, Local, VirtualEnv, etc label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:execution Related to the execution environment/mode, like Docker, Kubernetes, Local, VirtualEnv, etc enhancement New feature or request triage-needed Items need to be reviewed / assigned to milestone
Projects
None yet
Development

No branches or pull requests

1 participant