The problem I’m having
Right now, we are logging metadata about the run using the on-run-end hook, the issue is that no matter what command is ran (dbt seed, dbt, snapshot) the on-run-end executes. Is there a way to add a condition so that the run only gets logged if it’s ‘dbt run’ and not snapshot, seed, or anything else?
current on-run-end command
on-run-end:
- "{% if target.name == 'prod' %}{{ dbt_artifacts.upload_results(results) }}{% endif %}"