how can i solve
# ask-elementary-ai
m
how can i solve
k
A message from kapa.ai
Based on the snippets you shared, there are a few different issues that can cause errors with Elementary, each with a different “how to solve” path. Since your last concrete example is the
volume_anomalies()
/
generate_surrogate_key()
Snowflake issue, I’ll focus on the pattern shown there and in the other troubleshooting docs. ### 1. If your issue is with
volume_anomalies()
and Snowflake types From the Slack thread, the root cause was another package overriding
hash()
so it returned a
BINARY
, which then conflicted with Elementary’s expectation of a string key. The fix was: - Identify which package is overriding
hash()
. - Adjust your dbt
dispatch
so Elementary’s implementation is used for Elementary macros, instead of the conflicting one. [[Hash override issue](https://elementary-community.slack.com/archives/C02CTC89LAX/p1735815549097269)] In practice, that means customizing
dispatch
in
dbt_project.yml
so Elementary’s macros (including
generate_surrogate_key
) resolve to the correct package. ### 2. If your issue is “Query max size” / BigQuery or large queries For BigQuery “query max size” / “too many subqueries or query is too complex” errors, Elementary recommends reducing the max query size via a var in `dbt_project.yml`:
Copy code
yaml vars:   query_max_size: 100000    # or 1000000 depending on the case
This splits Elementary’s internal queries into smaller chunks. [[BQ query max size](https://elementary-community.slack.com/archives/C02CTC89LAX/p1690821395847869); [Query max size var](https://elementary-community.slack.com/archives/C02CTC89LAX/p1675173737705399)] ### 3. If
edr report
is empty or failing Follow the troubleshooting checklist: 1. Confirm the Elementary dbt package is installed at the latest version and that
dbt run --select elementary
has been executed. 2. Verify
elementary_test_results
exists and has *data*; if it’s empty, check for incorrect materializations being overridden by your
dbt_project.yml
. 3. Ensure the
elementary
CLI is up to date and run
edr report -u true
to refresh internal packages. 4. Make sure you have an
elementary
profile in
profiles.yml
that points to the schema where Elementary models live. [[Empty report troubleshooting](https://docs.elementary-data.com/oss/general/troubleshooting); [Missing elementary profile](https://elementary-community.slack.com/archives/C02CTC89LAX/p1683825474951199)] ### 4. If you’re seeing “cannot insert into a view” That means some Elementary models were materialized as views due to a global
materialized:
config in
dbt_project.yml
. Move that config under your own package instead of at the top level, so it doesn’t override package models. [[Cannot insert into a view](https://docs.elementary-data.com/oss/general/troubleshooting)] --- If you can paste the exact error message and your
dbt_project.yml
snippet (especially
models:
and
vars:
), I can point you to the specific fix among these patterns.