Josh Elston-Green
12/04/2023, 5:14 PM# Elementary vars stopping artefact upload on dev schemas
disable_run_results: "{{ (target.name not in ['prod','circleci_prod']) | as_bool }}"
disable_tests_results: "{{ (target.name not in ['prod','circleci_prod']) | as_bool }}"
disable_dbt_artifacts_autoupload: "{{ (target.name not in ['prod','circleci_prod']) | as_bool }}"
disable_dbt_invocation_autoupload: "{{ (target.name not in ['prod','circleci_prod']) | as_bool }}"
The query being executed in dev is the
INSERT INTO data_monitoring_metrics
Is there a new var I need to add or is this a bug with this particular model?Samuel Garfield
12/04/2023, 8:59 PMdata_monitoring_metrics table instead of the CI env tableNoa Kurman
12/05/2023, 9:22 AMSamuel Garfield
12/06/2023, 9:39 PM- package: elementary-data/elementary
version: 0.13.0Samuel Garfield
12/06/2023, 9:47 PMvars
vars:
disable_dbt_artifacts_autoupload: "{{ target.name == 'ci' }}"
disable_tests_results: "{{ target.name == 'ci' }}"
disable_run_results: "{{ target.name == 'ci' }}"
disable_dbt_invocation_autoupload: "{{ target.name == 'ci' }}"
Despite this on-run-end hooks are still running in our CI environment (where the job's target is set to ci). I confirmed {{ target.name == 'ci' }} evaluates to True by adding a model named test.sql with these contents:
select {{ target.name == 'ci' }}
When I download the compiled code from the dbt Cloud artifacts, the contents are:
select TrueSamuel Garfield
12/07/2023, 5:57 PMdbt=1.6.7 and databricks=1.6.6Maayan Salom
12/10/2023, 3:12 PMSamuel Garfield
12/14/2023, 9:39 PMSamuel Garfield
12/14/2023, 9:39 PMOfek Weiss
01/08/2024, 7:51 AMdata_monitoring_metrics are a part of the anomaly tests - they cannot be disabled if you with to use elementary anomaly tests drop corrupt 02Samuel Garfield
01/08/2024, 8:32 PMOfek Weiss
01/09/2024, 8:26 AMon-run-end hook, it will still write to the tables specifically related to anomaly tests.
you will still see the post-run-end hook running, as its all running in the same hook, but the dbt artifacts will not be uploaded