Daniel Horvath
02/17/2025, 4:38 PMedr and while yesterday it used 0.16.1 today it picked up 0.16.2 and now it produces the following error when running the report:
2025-02-17 15:31:48 — INFO — Running dbt command --log-format json run-operation elementary.log_macro_results --args {"macro_name": "elementary_cli.get_snapshots", "macro_args": {}} --project-dir /opt/hostedtoolcache/Python/3.13.2/x64/lib/python3.13/site-packages/elementary/monitor/dbt_project
/opt/hostedtoolcache/Python/3.13.2/x64/lib/python3.13/site-packages/dbt/adapters/sql/connections.py:97: UserWarning: DB-API extension cursor.connection used
cursor.execute(sql, bindings)
{"data": {"exc": "Database Error\\n column \\"unique_key\\" does not exist in dbt_snapshots"}, "info": {"category": "", "code": "Q001", "extra": {}, "invocation_id": "be9a0861-155f-4fc8-8027-21368d135ba5", "level": "error", "msg": "Encountered an error while running operation: Database Error\\n column \\"unique_key\\" does not exist in dbt_snapshots", "name": "RunningOperationCaughtError", "pid": 4974, "thread": "MainThread", "ts": "2025-02-17T15:31:49.083576Z"}}
ERROR:elementary.monitor.data_monitoring.report.data_monitoring_report:Could not generate the report - Error: Failed to run dbt command.
**2025-02-17 15:31:49 — ERROR — Could not generate the report - Error: Failed to run dbt command.**
{"info": {"name": "RunningOperationCaughtError", "code": "Q001", "msg": "Encountered an error while running operation: Database Error\\n column \\"unique_key\\" does not exist in dbt_snapshots", "level": "error", "invocationId": "be9a0861-155f-4fc8-8027-21368d135ba5", "pid": 4974, "thread": "MainThread", "ts": "2025-02-17T15:31:49.083576Z"}, "data": {"exc": "Database Error\\n column \\"unique_key\\" does not exist in dbt_snapshots"}}
**Please reach out to our community for help with this issue.**
It suggests in the logs to reach out to the community for help. Do you know how to resolve this?
I pinned down the version to 0.16.1 and that solved it, for now.Javi
02/17/2025, 7:35 PMJavi
02/17/2025, 7:36 PMMika Kerman
02/17/2025, 9:54 PMDharmin Siddesh J
02/18/2025, 5:18 AMDharmin Siddesh J
02/18/2025, 7:00 AMJavi
02/18/2025, 7:02 AMname: Run Elementary
on:
# Run the action when a push to the main branch of the repository is made.
push:
branches: [ "main", "master" ]
# Run the action when a pull request to the main branch is opened.
pull_request:
branches: [ "main", "master" ]
# Run the action in a scheduled manner every hour.
schedule:
- cron: '0 * * * *'
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
elementary:
runs-on: ubuntu-latest
environment: PRO
steps:
- name: Checkout dbt project
uses: actions/checkout@v4
- name: Run Elementary
uses: elementary-data/run-elementary-action@v1.12
with:
warehouse-type: snowflake # Type of warehouse to use (bigquery, snowflake, redshift, etc.)
#adapter-version: 1.5.0 # The dbt-adapter version that should be used (If not provided the latest version will be used).
profiles-yml: ${{ secrets.PROFILES_YML }} # Content of ~/.dbt/profiles.yml, should have an `elementary` profile.
edr-command:
edr report
--file-path "report.html"
&&
edr send-report
--google-service-account-path "/tmp/gcs_keyfile.json"
--gcs-bucket-name "${{ secrets.GCS_BUCKET_NAME }}"
--update-bucket-website "true"
gcs-keyfile: ${{ secrets.GCS_KEYFILE }} # If using GCS, the content of its keyfile.
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: report.html
path: report.html
- name: Upload log
if: always()
uses: actions/upload-artifact@v4
with:
name: edr.log
path: edr.logMika Kerman
02/18/2025, 8:02 AM