<@U088WCP3B4P> We are getting the warning message ...
# ask-elementary-ai
s
@kapa.ai We are getting the warning message
Copy code
WARNING — You are using incompatible versions between edr (0.20.1) and Elementary's dbt package (0.21.0).
I thought these were the latest versions ? Main issue is that with Redshift, we get the following error - which I thought was fixed in latest version 0.21.0
Copy code
INFO - [base] [0m18:49:01  Encountered an error: source=airflow.providers.cncf.kubernetes.utils.pod_manager.PodManager loc=pod_manager.py:477
[2025-12-18 05:49:01] INFO - [base] Database Error source=airflow.providers.cncf.kubernetes.utils.pod_manager.PodManager loc=pod_manager.py:477
[2025-12-18 05:49:02] INFO - [base]   cannot insert multiple commands into a prepared statement
k
A message from kapa.ai
You’re hitting two separate (but related) things: --- ### 1. Version compatibility warning The warning:
Copy code
text WARNING — You are using incompatible versions between edr (0.20.1) and Elementary's dbt package (0.21.0). To fix please update your packages.yml, and run: dbt deps && dbt run --select elementary
means: - Your CLI (edr) is
0.20.1
. - Your dbt package is
0.21.0
. Elementary expects these to be on matching major/minor versions (e.g.
edr 0.21.x
with dbt package
0.21.x
). This is the same pattern as in the earlier Slack example where
edr 0.10.0
with dbt package
0.7.5
caused the same warning and was resolved by aligning the versions and then running
dbt deps
and
dbt run --select elementary
. [[Airflow edr warning](https://elementary-community.slack.com/archives/C02CTC89LAX/p1692954138133379?thread_ts=1692954138.133379&amp;cid=C02CTC89LAX)] Also note: the CLI reads the dbt package version from the latest row in
dbt_invocations
in the Elementary schema, so if
dbt deps
/
dbt run --select elementary
were run on a different target or environment, the CLI can still think you’re on an old or mismatched version. [[Version mismatch invocations](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680277889043609?thread_ts=1680277889.043609&amp;cid=C02CTC89LAX)] Action to clear the warning: 1. Decide which version line you want to be on (e.g.
0.21.x
). 2. Make sure: -
pip show elementary-data
(or your dependency file) has
elementary-data==0.21.x
. -
packages.yml
has:
Copy code
yaml      packages:        - package: elementary-data/elementary          version: 0.21.0
3. In the same target/profile that Elementary uses, run:
Copy code
bash    dbt deps    dbt run --select elementary
4. Then re-run your
edr
command. If you already did this, double‑check that
dbt deps
and
dbt run --select elementary
were executed on the same target as the one configured in the Elementary profile, and that they were run after you updated
packages.yml
. [[Version mismatch invocations](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680277889043609?thread_ts=1680277889.043609&amp;cid=C02CTC89LAX)] --- ### 2. Redshift
cannot insert multiple commands into a prepared statement
This Redshift error is a known issue related to how Elementary’s dbt package generates `DELETE`/`INSERT` and cleanup statements inside transactions on Redshift. [[Redshift error context](https://github.com/elementary-data/elementary/issues/2063); [Slack Redshift thread](https://elementary-community.slack.com/archives/C08HW57FGN9/p1764339093392769?thread_ts=1764339093.392769&amp;cid=C08HW57FGN9)] Timeline from the sources: - Users on Redshift started seeing:
Copy code
text   Database Error     cannot insert multiple commands into a prepared statement
on models like
dbt_models
,
dbt_columns
,
dbt_exposures
, etc. [[Bug description](https://github.com/elementary-data/dbt-data-reliability/issues/902); [Slack Redshift thread](https://elementary-community.slack.com/archives/C08HW57FGN9/p1765135733010909?thread_ts=1765135733.010909&amp;cid=C08HW57FGN9)] - A first fix was released in the dbt package (PR 899) and shipped in Elementary
0.21.0
. [[PR 899 fix note](https://github.com/elementary-data/elementary/issues/2063)] - However, multiple users (including on
0.21.0
) still reported the same Redshift error, especially around: -
dbt_models
/
dbt_columns
models. - Cleanup of temporary test tables in
on-run-end
. [[Still failing on 0.21.0](https://github.com/elementary-data/elementary/issues/2063); [Slack follow‑up](https://elementary-community.slack.com/archives/C08HW57FGN9/p1765135733010909?thread_ts=1765135733.010909&amp;cid=C08HW57FGN9)] - Elementary then tested another fix and shared a workaround macro override plus a
dispatch
configuration that users could apply before the next release. [[Slack workaround + dispatch](https://elementary-community.slack.com/archives/C02CTC89LAX/p1765845240552129?thread_ts=1765845240.552129&amp;cid=C02CTC89LAX)] From the knowledge sources, it’s clear that: - The issue is **not fully resolved for all Redshift cases even on 0.21.0**; several users explicitly say they still see the error on
0.21.0
. [[Still failing on 0.21.0](https://github.com/elementary-data/elementary/issues/2063); [Slack 0.21.0 reports](https://elementary-community.slack.com/archives/C08HW57FGN9/p1765135733010909?thread_ts=1765135733.010909&amp;cid=C08HW57FGN9)] - Elementary provided a temporary override: - For the delete/insert logic, one user added a Redshift‑specific macro
redshift__get_delete_and_insert_queries
in their own project to avoid multiple commands in a single prepared statement. [[User macro override](https://elementary-community.slack.com/archives/C08HW57FGN9/p1764339093392769?thread_ts=1764339093.392769&amp;cid=C08HW57FGN9)] - For test temp table cleanup, another user followed a commit from Elementary’s repo and overrode the relevant macro in their own project, then added:
Copy code
yaml     dispatch:       - macro_namespace: elementary         search_order: ['<MY_PROJECT>', 'elementary']
in
dbt_project.yml
so their macro takes precedence. [[Slack workaround + dispatch](https://elementary-community.slack.com/archives/C02CTC89LAX/p1765845240552129?thread_ts=1765845240.552129&amp;cid=C02CTC89LAX)] Because the sources don’t show a final, universally‑working Redshift fix beyond these workarounds, I can’t confidently say that “0.21.0 fully fixes it” — in fact, the opposite is reported. --- ### What you can do now (based on the sources) 1. Align versions to remove the compatibility warning - Upgrade/downgrade so that: -
edr
and the dbt package are on the same minor version (e.g. both
0.21.x
). - Run
dbt deps
and
dbt run --select elementary
on the same target as Elementary’s profile. [[Airflow edr warning](https://elementary-community.slack.com/archives/C02CTC89LAX/p1692954138133379?thread_ts=1692954138.133379&amp;cid=C02CTC89LAX); [Version mismatch invocations](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680277889043609?thread_ts=1680277889.043609&amp;cid=C02CTC89LAX)] 2. Apply the Redshift workaround while waiting for a full fix - Add a Redshift‑specific override macro in your project (e.g.
macros/redshift_get_delete_and_insert_queries.sql
) as shown by the community member, and/or the additional cleanup macro from the Elementary commit referenced in Slack. [[User macro override](https://elementary-community.slack.com/archives/C08HW57FGN9/p1764339093392769?thread_ts=1764339093.392769&amp;cid=C08HW57FGN9); [Slack workaround + dispatch](https://elementary-community.slack.com/archives/C02CTC89LAX/p1765845240552129?thread_ts=1765845240.552129&amp;cid=C02CTC89LAX)] - Configure
dispatch
so your macros override Elementary’s:
Copy code
yaml      dispatch:        - macro_namespace: elementary          search_order: ['<YOUR_PROJECT_NAME>', 'elementary']
3. If needed, temporarily reduce Elementary’s footprint - Some users temporarily disabled artifact autoupload or Elementary entirely in production to unblock pipelines while the fix was being worked on, e.g.:
Copy code
yaml      vars:        elementary:          disable_run_results: true          disable_dbt_artifacts_autoupload: true          disable_dbt_invocation_autoupload: true
or by disabling Elementary in certain targets. [[Temp suppression vars](https://github.com/elementary-data/elementary/issues/2063)] --- If you share: - Your exact
edr
version, - The
elementary
version in
packages.yml
, - And whether you’ve already applied any macro overrides, you can then compare directly with the patterns and workarounds described in the linked issues and Slack threads above.