Hi Team, We recently enabled elementary in PROD. T...
# community-support
n
Hi Team, We recently enabled elementary in PROD. Trying to create a model level stats model using elementary models. However, I am looking for possible solution to Keep elementary disabled in dev/staging and only run/compile this new model in PROD. How can I achieve that? Any help is appreciated. Thanks in advance !!
✅ 1
👀 1
e
Hey @Nitya Anugu! You can can conditionally disable that:
Copy code
models:
  ## see docs: <https://docs.elementary-data.com/>
  elementary:
    ## elementary models will be created in the schema '<your_schema>_elementary'
    +schema: "elementary"
    ## To disable elementary for dev, uncomment this:
    # enabled: "{{ target.name in ['prod','analytics'] }}"
See here for more details
n
Hi @Erik Zaadi Yes, we tried this. As I am referencing elementary models in my new model I am getting below error if I disable elementary in dev.
Copy code
Model 'model.warehouse.dbt_model_level_stats' (models/observability/dbt_model_level_stats.sql) depends on a node named 'dbt_run_results' which is disabled
Wondering if we have a better way to handle as I want to keep elementary disabled in dev as it slows down other team members work by running hooks in dev.
@Erik Zaadi following up on this one. Thank you !!
o
@Nitya Anugu you can try disabling your model (
model.warehouse.dbt_model_level_stats
) for dev as well