LewisDavies / upstream-prod

A dbt package for easily using production data in a development environment.
32 stars 4 forks source link

Improve handling of refs in tests #6

Closed LewisDavies closed 1 year ago

LewisDavies commented 1 year ago

Previously, the package only looked for prod relations for models and snapshots. Most tests only have one ref, so getting refs with dbt's builtin macro was good enough.

However, this wasn't ideal for tests with refs to multiple models, such as relationship tests; if a comparison model didn't exist in dev, tests would fail. These changes expands the model logic to cover tests.