flexanalytics / dbt_observability

Apache License 2.0
1 stars 0 forks source link

Create variable for upload_results based on target #11

Closed ataft closed 2 months ago

ataft commented 5 months ago

Currently, each project must define the on-run-end statement and logic to run only on 'prod', like this:

on-run-end:
  - "{% if target.name == 'prod' %}
        {{ dbt_observability.upload_results(results) }}
     {% endif %}"

We should fix this so projects only need to configure:

on-run-end: "dbt_observability.upload_results(results)"

Then, have a variable like "dbt_observability:target" that we can set to 'prod' or other values (maybe multiple?)

MiConnell commented 2 months ago

Addressed in #20 with the new "dbt_observability:environments" variable