Savannah Stelling
03/04/2024, 11:29 PMedr monitor through GHA. im getting the message “Update skipped alerts” and no alerts are being sent out, after checking all of the alerts_* tables, they are coming up blank. elementary_test_results table has results, however. any ideas why these tables arent populating?Idan Shavit
03/05/2024, 5:34 AMSavannah Stelling
03/05/2024, 4:32 PMelementary_test_results is only showing results from the most recent run last night (we have it running when we refresh dbt nightly)
3. yes, there are failures present
4. i dont see an alerts_v2 table, the below screenshot shows the alerts tables we have populating
5. yes, there is data in dbt_tests, similarly to elementary_test_results it only shows data from the most recent nightly runIdan Shavit
03/05/2024, 4:40 PMSavannah Stelling
03/05/2024, 5:01 PMname: Run Elementary
on:
# Run the action in a scheduled manner every hour.
schedule:
- cron: '0 11 * * *'
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
jobs:
elementary:
runs-on: [self-hosted, Linux, x64, fargate, prod]
env:
PROFILES_YML_HOST_PROD_SERVERLESS: ${{ secrets.PROFILES_YML_HOST_PROD_SERVERLESS }}
PROFILES_YML_USER_PROD: ${{ secrets.PROFILES_YML_USER_PROD }}
PROFILES_YML_PW_PROD: ${{ secrets.PROFILES_YML_PW_PROD }}
ELEMENTARY_SLACK_TOKEN: ${{ secrets.ELEMENTARY_SLACK_TOKEN }}
ELEMENTARY_SLACK_CHANNEL: ${{ secrets.ELEMENTARY_SLACK_CHANNEL }}
ELEMENTARY_REPORT_BUCKET: ${{ secrets.ELEMENTARY_REPORT_BUCKET }}
steps:
- name: Checkout dbt project
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Elementary
run: pip install 'elementary-data[redshift]'
- name: Run Elementary
shell: bash -l {0}
run: |
edr monitor --profiles-dir /actions-runner/_work/${{ github.event.repository.name }}/${{github.event.repository.name }}/ci_cd/prod_dbt --slack-token $ELEMENTARY_SLACK_TOKEN --slack-channel-name $ELEMENTARY_SLACK_CHANNEL
edr send-report --env prod --profiles-dir /actions-runner/_work/${{ github.event.repository.name }}/${{github.event.repository.name }}/ci_cd/prod_dbt --s3-bucket-name $ELEMENTARY_REPORT_BUCKET --update-bucket-website "true"
- name: Upload report
uses: actions/upload-artifact@v3
with:
name: elementary_report.html
path: elementary_report.html
- name: Upload log
if: always()
uses: actions/upload-artifact@v3
with:
name: edr.log
path: edr.logSavannah Stelling
03/05/2024, 9:02 PMdw_elementary, but alerts_v2 is going to dw). the table is still empty in that location as wellIdan Shavit
03/06/2024, 6:46 AMdw_elementary and the schema that alerts_v2 is writing to is dw I think that you need to tweak the elementary profile to use the schema dw_elementary - on our dbt package we add the _elementary suffix to the schema, but for the edr we need to specify the schema it should look for the data at, which in your case is dw_elementary. So the elementary profile should have the schema dw_elementary - This is probably why your tables are empty 🙂Idan Shavit
03/06/2024, 6:47 AMYaoni
03/19/2024, 11:39 PMdbt run -s elementary. I previously had different versions for edr and dbt package and had since fixed the version gap, but I probably forgot to run this command.Savannah Stelling
03/20/2024, 4:14 PM