Hey, One of our GitHub Actions uses `edr` and whil...
# community-support
d
Hey, One of our GitHub Actions uses
edr
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:
Copy code
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.
1️⃣ 1
j
Hey @Daniel Horvath, how did you pin down the version the elementary in the GitHub action?
We are using elementary-data/run-elementary-action@v1.12 How can we specify the version of Elementary Data to install in the action?
m
Hi @Daniel Horvath, what's your dbt-data-reliability package version?
d
I am not using such a package (dbt-data-reliability) I am using only dbt-databricks and elementary-data[databricks] package
However the issue is fixed by fixing the elementary-data version to 0.16.1
j
Morning @Dharmin Siddesh J, how do we specify the elementar-data version to 0.16.1 in the github action? that is our yml
Copy code
name: 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.log
m
I meant the elementary dbt package version, sorry for the confusion