core sched

This commit is contained in:
Eric Laurello 2025-02-07 08:29:07 -05:00
parent 9c666d8bbf
commit e51cf7ff12
2 changed files with 49 additions and 2 deletions

View File

@ -3,8 +3,8 @@ run-name: dbt_run_dev_refresh
on:
workflow_dispatch:
# schedule:
# - cron: '27 8 * * *'
schedule:
- cron: '27 8 * * *'
env:
DBT_PROFILES_DIR: "${{ vars.DBT_PROFILES_DIR }}"

View File

@ -0,0 +1,47 @@
name: dbt_run_incremental_core
run-name: dbt_run_incremental_core
on:
workflow_dispatch:
schedule:
# run 25 minutes past the hour, every 4 hours except for 1:25 to get the full previous day
# BQ to SF export runs at 5 after the hour on the same hourly schedule
- cron: "25 1,4,8,12,16,20 * * *"
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
- name: Run DBT Jobs
run: |
dbt run -m "stellar_models,tag:scheduled_core"