LewisDavies / upstream-prod

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

Make project vars optional & add fallback logic #1

Closed LewisDavies closed 1 year ago

LewisDavies commented 1 year ago

The variables upstream_prod_database and upstream_prod_schema tell the package where to find production data. Previously, both had to be set to avoid errors. Now only one is required, which should make it easier to use the package with certain setups.

There's now also an option to fall back to the default target when a relation doesn't exist in prod. This is useful when building brand >1 new model. Instead of running all upstream models every time, e.g. dbt run -s new_model_1 new_model_2, you can use dbt run -s new_model_2 and it will refer to the dev version of new_model_1.