Any idea what could be going on? I use the followi...
# community-support
r
Any idea what could be going on? I use the following config in my dbt_project.yml to disable the on-run-end hook (eventually I will set this via env var):
Copy code
vars:
  disable_dbt_artifacts_autoupload: true
However the on-run-end hook is still executed and uploading dbt artifacts. Ideally I want to be able to fully disable or enable elementary models + on-run-end hooks via one environment variable.
a
You can add more of these options to limit the on-run-end hooks:
Copy code
vars:
  disable_run_results: true
  disable_tests_results: true
  disable_dbt_artifacts_autoupload: true
  disable_dbt_invocation_autoupload: true
r
Can you explain briefly what is the difference between all 4 of them. For me it is a bit confusing, because I'd expect with
disable_dbt_artifacts_autoupload
to disable the whole thing, because in the end it is all dbt artifacts (e.g. run_results.json, manifest.json, etc.) that elementary parses and uploads (as incremental models) to the elementary tables right?
a
As I understand it, there are two types of models that elementary updates:
Metadata
and
Results
models. The metadata models store the project's settings and resources:
dbt_models
,
dbt_tests
,
dbt_sources
. The results models store the logs of the results of the runs/tests (
dbt_run_results
,
elementary_test_results
). And these variables individually disable each type of model. Example, using this alone will disable only the metadata models:
Copy code
vars:
  disable_dbt_artifacts_autoupload: true
Using this will only disable the result models:
Copy code
vars:
  disable_dbt_invocation_autoupload: true
And you can individually disable results and tests if you need to:
Copy code
vars:
  disable_run_results: true
  disable_tests_results: true
Source: https://docs.elementary-data.com/dbt/on-run-end_hooks#can-i-disable-the-
d
Hey @Ramon Vermeulen, Were you able to use these variables to achieve what you wanted ?
r
Thanks for the explanation @Arthur Gusmão! I will see if I can set one env var to disable both Metadata and Results models at the same time!
✅ 1
I tried it like this (also without as_bool or even directly set to true):
Copy code
vars:
  disable_dbt_artifacts_autoupload: "{{ env_var('DBT_DISABLE_ELEMENTARY', false) | as_bool }}"
  disable_dbt_invocation_autoupload: "{{ env_var('DBT_DISABLE_ELEMENTARY', false) | as_bool }}"
and setting the
DBT_DISABLE_ELEMENTARY
as
export DBT_DISABLE_ELEMENTARY=true
However the on-run-end hook still ingests the artifact data after every run, I am still on elementary version
0.13.0
(if this is known behaviour for that version?)
j
following because I am seeing the same issue @Daniel Pollak. Running elementary version
0.17.0
and dbt version
1.7
. With the below vars in my root project
dbt_project.yml
file the
elementary.on-run-start
and
elementary.on-run-end
hooks are still running when I run dbt
Copy code
vars:
  disable_run_results: true
  disable_tests_results: true
  disable_dbt_artifacts_autoupload: true
  disable_dbt_invocation_autoupload: true