ccao-data / data-architecture

Codebase for CCAO data infrastructure construction and management
https://ccao-data.github.io/data-architecture/
5 stars 3 forks source link

Add dbt testing framework for seeds #447

Closed Damonamajor closed 1 month ago

Damonamajor commented 1 month ago

File changes:

This produces a simple test which identifies if all LOA values are less than .38. This is the largest value in the ccao.loa.csv file, and passes as could be expected.

Does testing seeds work as expected?

To figure this out, we created a temporary target file and changed one of the values in ccao.loa.csv. We randbt build -s state:modified state:new --exclude "tag:test_qc*" --state "target-old". When we did not change any values, the seed test was not initiated. We then modified ccao.loa.csv with a number which we suspected would create an error. When this file was modified, the test was run, and an error was produced.