Skip to content

dbt_test_scheduled_hourly #16809

dbt_test_scheduled_hourly

dbt_test_scheduled_hourly #16809

name: dbt_test_scheduled_hourly
run-name: dbt_test_scheduled_hourly
on:
workflow_dispatch:
schedule:
# Run at xx:20 UTC hourly (see https://crontab.guru)
- cron: '14 */1 * * *'
env:
DBT_PROFILES_DIR: "${{ vars.DBT_PROFILES_DIR }}"
ACCOUNT: "${{ vars.ACCOUNT }}"
ROLE: "${{ vars.ROLE }}"
USER: "${{ vars.USER }}"
PASSWORD: "${{ secrets.PASSWORD }}"
REGION: "${{ vars.REGION }}"
DATABASE: "${{ vars.DATABASE }}"
WAREHOUSE: "${{ vars.WAREHOUSE }}"
SCHEMA: "${{ vars.SCHEMA }}"
concurrency:
group: ${{ github.workflow }}
jobs:
run_dbt_jobs:
runs-on: ubuntu-latest
environment:
name: workflow_prod
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "${{ vars.PYTHON_VERSION }}"
cache: "pip"
- name: install dependencies
run: |
pip install -r requirements.txt
dbt deps
# Run the streamline__transactions_and_votes_missing_7_days model to update after the tests
# This is necessary as the table is referenced in streamline views but DBT drops test output tables when they run
# so at time this will cause the streamline views to fail because the table it is trying to reference has been dropped.
# This should prevent that from happening by always referencing the model instead of the test output
- name: Run DBT Jobs
run: |
dbt test -s "solana_models,tag:test_hourly"
- name: Run DBT Jobs 2
if: success() || failure()
run: |
dbt run -s streamline__transactions_and_votes_missing_7_days