Hi! Can someone help me troubleshoot a recent fail...
# community-support
j
Hi! Can someone help me troubleshoot a recent failure we’ve been hitting with Elementary? Our team has been using Elementary OSS to generate dashboards for several different DAGs. It’d been working perfectly until recently, when the DAG task started failing with
exit status 137
. This looks like an OOM error, which seems unexpected for the Elementary task, and occurs when calling
edr send-report
. Version details: • Python 3.11 • edr version: 0.15.1 • elementary-data[bigquery] version: 0.15.1 • elementary-data/elementary version: 0.15.2 • dbt-core version: 1.8.1 • dbt-bigquery version: 1.8.1 • dbt_utils version: 0.8.6 Error details: • The error occurs while running
edr send-report
. We use GCP, and upload the
elementary_report.html
to a GCS bucket. • We only run into this issue on one of our DAGs. • I reviewed the GKE logs and didn’t see anything noteworthy. Happy to copy them in if helpful Thanks in advance! Let me know if there’s any other information I can provide.
n
Hey Jason! Can you try updating to Elementary dbt 0.17.0 and Elementary CLI 0.17.0 and see if it persists? Make sure to run
dbt run --select elementary
after updating 🙂
👀 1
j
Hey Noya, thanks for the follow up! Let me see if this is something we’re able to fit into this sprint, will circle back once I have more to share 🙂
🙌 1
n
Great! Just here to say that the update is very quick ☺️
j
Hey @Noya Offer! Following up here—I’ve been trying to update our Elementary setup’s dbt version to 0.18.2 and CLI veresion to 0.18.1, but am running into two issues: 1.
WARNING — You are using incompatible versions between edr (0.18.1) and Elementary's dbt package (0.15.2).
◦ The
edr
command appears to install the incorrect dbt package version when running
dbt deps
. Instead of installing version
0.18.2
as specified in our setup’s packages.yml / package-lock.yml, it installs version
0.15.2
2.
ERROR — Could not generate the report - Error: elementary.monitor.fetchers.models.schema.SnapshotSchema() argument after ** must be a mapping, not str
Can you help me troubleshoot? Thank you in advance!!
n
Hey @Jason Deng! The second error is happening because of the first, so let's fix the first 🙂 Can you try running
dbt run --select elementary
after
dbt deps
?
👀 1
j
Thanks Noya! I added
dbt deps
followed by
dbt run --select elementary
to our entrypoint file before
edr send-report
, but it did not resolve the issue. I’ve copied in the logs below. Things that stand out to me: •
The selection criterion 'elementary' does not match any enabled nodes
• Elementary appears to run its own
dbt deps
command later on, then flags the version mismatch between edr and the dbt package
Copy code
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] INFO:__main__:Running Elementary dbt deps
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] 15:06:05  Running with dbt=1.8.1
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] 15:06:05  Installing dbt-labs/dbt_utils
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] 15:06:05  Installed from version 1.1.1
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] 15:06:05  Updated version available: 1.3.0
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] 15:06:05  Installing elementary-data/elementary
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] 15:06:05  Installed from version 0.18.2
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] 15:06:05  Up to date!
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] 15:06:05
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] 15:06:05  Updates available for packages: ['dbt-labs/dbt_utils']
[2025-04-15, 10:06:07 CDT] {pod_manager.py:477} INFO - [base] Update your versions in packages.yml, then run dbt deps
[2025-04-15, 10:06:09 CDT] {pod_manager.py:477} INFO - [base] 15:06:07  Running with dbt=1.8.1
[2025-04-15, 10:06:09 CDT] {pod_manager.py:477} INFO - [base] 15:06:09  Registered adapter: bigquery=1.8.1
[2025-04-15, 10:06:19 CDT] {pod_manager.py:477} INFO - [base] 15:06:09  Unable to do partial parsing because saved manifest not found. Starting full parse.
[2025-04-15, 10:06:19 CDT] {pod_manager.py:477} INFO - [base] 15:06:19  Found 84 models, 1 snapshot, 64 data tests, 32 seeds, 107 sources, 1352 macros, 26 unit tests
[2025-04-15, 10:06:19 CDT] {pod_manager.py:477} INFO - [base] 15:06:19  The selection criterion 'elementary' does not match any enabled nodes
[2025-04-15, 10:06:19 CDT] {pod_manager.py:477} INFO - [base] 15:06:19
[2025-04-15, 10:06:20 CDT] {pod_manager.py:477} INFO - [base] 15:06:19  Nothing to do. Try checking your model configs and model specification args
[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base] INFO:__main__:Running the following command to create the Elementary report: edr send-report --google-project-name tl-tj02f1qsdh39wgwfinwc --gcs-bucket-name tl-dev-elementary-reports --bucket-file-path reports/expert_deid_jd/elementary_report.html --config-dir /opt/tempus/transform/dbt/edr_config --profiles-dir /opt/tempus/transform/dbt/profiles
2025-04-15T15:06:22.544041744Z 

[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base]     ________                          __
[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base]    / ____/ /__  ____ ___  ___  ____  / /_____ ________  __
[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base]   / __/ / / _ \/ __ `__ \/ _ \/ __ \/ __/ __ `/ ___/ / / /
[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base]  / /___/ /  __/ / / / / /  __/ / / / /_/ /_/ / /  / /_/ /
[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base] /_____/_/\___/_/ /_/ /_/\___/_/ /_/\__/\__,_/_/   \__, /
[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base]                                                  /____/
2025-04-15T15:06:22.544139958Z 

2025-04-15T15:06:22.544144883Z 

[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base] Any feedback and suggestions are welcomed! join our community here - <https://bit.ly/slack-elementary>
2025-04-15T15:06:22.623486166Z 

[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base] 2025-04-15 15:06:22 — INFO — Running with edr=0.18.1
[2025-04-15, 10:06:22 CDT] {pod_manager.py:477} INFO - [base] 2025-04-15 15:06:22 — INFO — Installing packages for edr internal dbt package...
[2025-04-15, 10:06:33 CDT] {pod_manager.py:477} INFO - [base] 2025-04-15 15:06:22 — INFO — Running dbt command --log-format json deps --project-dir /opt/tempus/transform/lib/python3.11/site-packages/elementary/monitor/dbt_project --profiles-dir /opt/tempus/transform/dbt/profiles
[2025-04-15, 10:06:33 CDT] {pod_manager.py:477} INFO - [base] 2025-04-15 15:06:33 — WARNING — You are using incompatible versions between edr (0.18.1) and Elementary's dbt package (0.15.2).
[2025-04-15, 10:06:33 CDT] {pod_manager.py:477} INFO - [base]  To fix please update your packages.yml, and run:
[2025-04-15, 10:06:33 CDT] {pod_manager.py:477} INFO - [base] dbt deps && dbt run --select elementary
n
Do you have this in your
dbt_project.yml
?
Copy code
models:
  elementary:
    +schema: elementary
j
Yes, we have a variation on it
Copy code
models:
  elementary:
    ## elementary models will be created in the schema '<your_schema>_elementary'
    +schema: "{{ env_var('DEID_DATASET_NAME', '') }}_elementary"
    +enabled: "{{ env_var('ENV', '') in ['val','prd'] }}"
🙌 1
n
Thanks. Could there maybe be another
packages.yml
file in your project?
j
Just the single one that’s located next to
dbt_project.yml
in the dbt root directory. The dir structure looks like this: • /dbt/ ◦ dbt_project.yml ◦ package-lock.yml ◦ packages.yml
packages.yml
contains the following:
Copy code
packages:
  - package: dbt-labs/dbt_utils
    version: [ "1.1.1" ]
  - package: elementary-data/elementary
    version: [ "0.18.2" ]
package-lock.yml
contains the following:
Copy code
packages:
  - package: dbt-labs/dbt_utils
    version: 1.1.1
  - package: elementary-data/elementary
    version: 0.18.2
sha1_hash: c18ddabea7bd01178d14b40a2bfe66bfdcf59b9c
👀 1
Hey @Noya Offer, following up here—any suggestions for troubleshooting? I’m thinking of testing other Elementary versions for this update, but happy to try any other suggestions too!
n
Hey! Still looking for a solution, hope to have a good answer tomorrow🙏 Can you maybe try removing and installing both Elementary packages?
👀 1
Hey @Jason Deng, one of our engineers took another look at this. Can you please run the entire project once (
dbt run
)? It should update the internal Elementary version.
👀 1
j
Can you please run the entire project once (
dbt run
)? It should update the internal Elementary version.
I’ll give this a shot!
Hey @Noya Offer, after giving this a quick test I think it won’t be feasible for us to execute
dbt run
on the entire project during the Elementary DAG task. Context: our project is split into several different pipelines, each with their own set of configs that get injected at runtime and are used to target our dbt runs at specific models depending on the pipeline and the task. Running the entire project with
dbt run
leads to collisions and isn’t feasible. I’ll try out other versions of Elementary and see if that resolves the issue. Will circle back