BK
06/13/2024, 8:00 AM20:39:08 target not specified in profile 'elementary', using 'default'
20:39:08 Running with dbt=1.4.9
20:39:08 Unable to do partial parsing because config vars, config profile, or config target have changed
20:39:15 Found 39 models, 6 tests, 0 snapshots, 0 analyses, 1294 macros, 2 operations, 0 seed files, 6 sources, 0 exposures, 0 metrics
20:39:15
20:39:16
20:39:16 Running 1 on-run-start hook
20:39:16 1 of 1 START hook: elementary.on-run-start.0 ................................... [RUN]
20:39:16 1 of 1 OK hook: elementary.on-run-start.0 ...................................... [OK in 0.00s]
20:39:16
20:39:16 Concurrency: 8 threads (target='default')
20:39:16
20:39:16 1 of 1 START sql incremental model dbt_elementary.alerts_v2 .................... [RUN]
20:39:16 1 of 1 ERROR creating sql incremental model dbt_elementary.alerts_v2 ........... [ERROR in 0.56s]
20:39:16
20:39:16 Running 1 on-run-end hook
20:39:16 1 of 1 START hook: elementary.on-run-end.0 ..................................... [RUN]
20:39:16 1 of 1 OK hook: elementary.on-run-end.0 ........................................ [OK in 0.00s]
20:39:16
20:39:16
20:39:16 Finished running 1 incremental model, 2 hooks in 0 hours 0 minutes and 1.07 seconds (1.07s).
20:39:17
20:39:17 Completed with 1 error and 0 warnings:
20:39:17
20:39:17 Database Error in model alerts_v2 (models/alerts/alerts_v2.sql)
20:39:17 relation "dbt_elementary.test_result_rows" does not exist
20:39:17 compiled Code at target/run/elementary_cli/models/alerts/alerts_v2.sql
20:39:17
This the github actions setup i'm using.
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: production-cluster-data-platform-runner
steps:
- name: Checkout dbt project
uses: actions/checkout@v3
- name: Run Elementary
uses: elementary-data/run-elementary-action@v1.11
with:
warehouse-type: redshift # Type of warehouse to use (bigquery, snowflake, redshift, etc.)
adapter-version: 1.4.0 # The dbt-adapter version that should be used (If not provided the latest version will be used).
profiles-yml: ${{ secrets.ELEMENTARY_PROFILES_YML}} # Content of ~/.dbt/profiles.yml, should have an `elementary` profile.
edr-command:
edr monitor
--slack-token "${{ secrets.SLACK_TOKEN }}"
--slack-channel-name "${{ secrets.SLACK_CHANNEL_NAME }}"
&&
edr report
--file-path "report.html"
&&
edr send-report
--slack-token "${{ secrets.SLACK_TOKEN }}"
--slack-channel-name "${{ secrets.SLACK_CHANNEL_NAME }}"
--aws-access-key-id "${{ secrets.AWS_ACCESS_KEY_ID }}"
--aws-secret-access-key "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
--s3-bucket-name "${{ secrets.S3_BUCKET_NAME }}"
- name: Upload report
uses: actions/upload-artifact@v3
with:
name: report.html
path: report.html
- name: Upload log
if: always()
uses: actions/upload-artifact@v3
with:
name: edr.log
path: edr.logDenis Kokorin
06/13/2024, 9:03 AMrelation "dbt_elementary.test_result_rows" does not existIt looks like you try to run EDR commands without running Elementary as part of DBT project. Elementary DBT package should be run before EDR.
BK
06/14/2024, 7:57 AMdbt run --elemantary to generate the test results before running the edr command.