1

Hello could anyone help me how to check this error message I'm encountering. previously it used to work but upon running dbt clean its not working anymore. Your response is highly appreciated. Thank you so much.

Steps to recreate:

dbt clean; dbt deps; dbt test

my packages.yml contains this one

packages:
  - package: dbt-labs/dbt_utils
    version: 1.0.0

packages:
  - package: calogica/dbt_expectations
    version: [">=0.8.0", "<0.9.0"]

Screenshot:

schema.yml screenshot

schema.yml structure

dbt deps installation

Error message

tconbeer
  • 4,570
  • 1
  • 9
  • 21
Harris
  • 115
  • 6

2 Answers2

1

You've duplicated the packages: key, and dbt is ignoring the first one. Your packages.yml file should look like this, with only one packages: key:

packages:
  - package: dbt-labs/dbt_utils
    version: 1.0.0
  - package: calogica/dbt_expectations
    version: [">=0.8.0", "<0.9.0"]

This probably used to be okay because dbt_expectations used to depend on dbt_utils (via dbt_date), but it doesn't anymore (since dbt_date doesn't), so when you ran dbt clean && dbt deps, it grabbed a newer version of dbt_expectations, which didn't also install dbt_utils.

tconbeer
  • 4,570
  • 1
  • 9
  • 21
0

dbt clean removes all packages, so you’ll need to dbt deps to install them again.

Josh D.
  • 1,068
  • 9
  • 18
  • actually after I do dbt clean, I also do dbt deps so I'm re installing again the packages. so I don't understand I encounter this error message since the packages were successfully installed before I run my test. – Harris Jan 20 '23 at 08:42