Skip to content

Conversation

@sercancicek
Copy link
Contributor

@sercancicek sercancicek commented Jul 31, 2025

When running dbt-score, if dbt parse fails, the error message does not reflect the root cause of the failure. This PR attaches the root cause to the DbtParseException object and prints it to the console.

Here’s an example of how it looks:

$ dbt-score lint -p

ERROR:dbt_score.cli:dbt failed to parse project. dbt parse failed.

Root cause: Compilation Error
  Model 'model.edge.example_incremental_model' (models/example_incremental_model/example_incremental_model.sql) depends on a node named 'example_overwrite_not_exists_model' which was not found

Copy link
Contributor

@jochemvandooren jochemvandooren left a comment

Choose a reason for hiding this comment

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

Nice, works well! 🚀 Tiny comment, approving already

@sercancicek sercancicek requested a review from matthieucan August 1, 2025 06:30
@sercancicek sercancicek merged commit 500fb7d into master Aug 1, 2025
4 checks passed
@sercancicek sercancicek deleted the scicek/display-dbt-parse-errors branch August 1, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants