Search code examples
compiler-errorsyamldbt

In dbt, when I add a well formatted .yml file to my project, I stop being able to run dbt or compile SQL until I delete the yaml file. Why?


Thank you in advance for helping me in my journey! I am a dbt newb, doing the dbt fundamentals course. I am following the directions exactly.

Sequence of the issue:

  1. I created .sql files in my models folder and subfolders, compiled them, ran dbt, and they showed up in my Snowflake DW. No problem

  2. I added a .yml file to one of the sub folders enter image description here

  3. The issue happens when I click "save" to save the code to the .yml file - that the course provided here. (See compilation error in screenshot)

enter image description here

  1. When I click on Compilation Error, I get this (Refreshing the IDE does not help):

Partial parsing enabled: 0 files deleted, 0 files added, 1 files changed. 'version'

enter image description here

  1. At this point, I am not able to run any of the models, even those in other subfolders. For example enter image description here

  2. Also, those .sql files also have the same compilation error above.

  3. When I delete the .yml file, everything goes to normal and all the errors disappear.

  4. things I have tried:

  • Deleting all the contents of the yml file and hitting save --> the compilation error goes away
  • Changing indentation
  • Only leaving a single test instead of two
  • Creating the yml file in a different subfolder
  • Signing out of dbt and back in

Please help! thank you


Solution

  • I think it may be this bug: https://github.com/dbt-labs/dbt/issues/3567

    That's related to partial parsing, which is a dbt Core performance optimization used in the dbt Cloud IDE. We rebuilt partial parsing from the ground up in v0.20.0, and we'll be including fixes for bugs we uncover (including that one) in v0.20.1.

    In the meantime, if you find yourself in an error state like the one above, you can trigger a full re-parse by deleting the file target/partial_parse.msgpack.