<@U088WCP3B4P> I have two main environments, stagi...
# ask-elementary-ai
a
@kapa.ai I have two main environments, staging and prod. In staging, we use the defer cmd of dbt which allows us to use prod tables instead of always building staging tables with each new feature in a merge request. I have an issue though because the on-run-end hook of elementary is trying to write the run_results to prod even though i'm in staging env. This is the cmd i'm using : dbt run --select state:modified --target composer-stg --defer --state dbt_state_production This is the error i'm getting : [2025-07-09, 162628 UTC] {pod_manager.py:472} INFO - [base] 162628 on-run-end failed, error: [2025-07-09, 162628 UTC] {pod_manager.py:472} INFO - [base] Access Denied: Table project-prodelementary.dbt run results Permission bigquery.tables.updateData denied on table project-prod:elementary.dbt_run_results (or it may not exist). Is there something i can do in elementary side so that it uses the correct env on the on-run-end hook ?
k
A message from kapa.ai
New message text here