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

Better error handling for compilation exceptions in .yml files #2499

Closed
drewbanin opened this issue May 29, 2020 · 1 comment
Closed

Better error handling for compilation exceptions in .yml files #2499

drewbanin opened this issue May 29, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@drewbanin
Copy link
Contributor

Describe the bug

A malformed yml file can result in an error like:
Screen Shot 2020-05-29 at 9 15 37 AM

Instead, this error should include information about the file in which the errant jinja code was found.

Steps To Reproduce

Create a .yml file with the contents:

version: 2

models:
  - name: debug
    meta:
      abc: 123

      columns:
        - name: id
          description: '{{ doc("mydoc") }}'

Note that the columns entry is errantly indented under meta.

Run dbt ls or dbt compile to see the compilation exception.

Expected behavior

I would expect to see the filename containing the errant code in the raised exception.

The output of dbt --version:

v0.17.0-rc3
@drewbanin drewbanin added the bug Something isn't working label May 29, 2020
@drewbanin drewbanin added this to the Marian Anderson milestone May 29, 2020
beckjake added a commit that referenced this issue May 29, 2020
…errors

add project names/filenames/values to rendering errors (#2499)
@drewbanin drewbanin modified the milestones: Marian Anderson, 0.17.1 Jul 6, 2020
@drewbanin
Copy link
Contributor Author

closed in #2501

@jtcohen6 jtcohen6 modified the milestones: 0.17.1, Marian Anderson Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants