Adrian Lievano
02/07/2024, 5:04 PMdbt run -s elementary
I get this error. We are on dbt version:
- installed: 1.7.7
Plugins:
- snowflake: 1.7.1
Packages:
packages:
- package: dbt-labs/dbt_utils
version: 1.1.1
# <https://hub.getdbt.com/dbt-labs/dbt_utils/latest/>
- package: dbt-labs/audit_helper
version: 0.9.0
# <https://hub.getdbt.com/dbt-labs/audit_helper/latest/>
- package: brooklyn-data/dbt_artifacts
version: 2.6.2
# <https://hub.getdbt.com/brooklyn-data/dbt_artifacts/latest/>
- package: calogica/dbt_expectations
version: 0.10.1
# <https://hub.getdbt.com/calogica/dbt_expectations/latest>
- package: dbt-labs/codegen
version: 0.12.1
# <https://hub.getdbt.com/dbt-labs/codegen/latest>
- package: elementary-data/elementary
version: 0.13.2
#<https://hub.getdbt.com/elementary-data/elementary/latest/>
anyone run into similar isssues? Here is my dbt_project.yml:
```models:
+copy_grants: true
+persist_docs:
relation: true
columns: true
project_name: {}
dbt_artifacts:
elementary:
+schema: "elementary"Adrian Lievano
02/07/2024, 5:15 PMon-run-end:
# We disable dbt artifacts on the dev database, as dev schemas are dropped after Buildkite runs
# - "{%- if target.database != 'dev' -%} {{ dbt_artifacts.upload_results(results) }} {% endif %}"Maayan Salom
02/08/2024, 8:57 PMon-run-end that is erroring isn't the elementary one, its the one you disabled of dbt-artifacts. Checked our code and we don't have a reference to a message field. Looking at their repo - they do.
I assume that what happens is both packages have some macro that is named the same. We call all the macros with a namespace (elementary.), but if they don't dbt can use ours. It's very annoying, but on packages dbt's default is first check if the macro exists in the project itself, if not look for it in packages in random order.
We also add edr_ to the start of macros with generic names to avoid that (example - I see they use type_string, our macro is named edr_type_string), but maybe we missed something.
Is this a blocker for you? If you share the exact query that failed from the DWH I can look more into it.Adrian Lievano
02/08/2024, 10:41 PMAdrian Lievano
02/08/2024, 10:42 PMelementary:
+schema: "elementary"
## To disable elementary for dev, uncomment this:
+enabled: "{{ target.database != 'dev' }}"
and
on-run-end:
#We disable dbt artifacts on the dev database, as dev schemas are dropped after Buildkite runs
- "{%- if target.database != 'dev' -%} {{ dbt_artifacts.upload_results(results) }} {% endif %}"