Merge pull request #55 from FlipsideCrypto/schedule-and-streamline

schedule updates and split streamline job
This commit is contained in:
eric-laurello 2023-11-17 14:16:29 -05:00 committed by GitHub
commit adcba541e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 6 deletions

View File

@ -0,0 +1,34 @@
name: dbt_run_streamline_realtime_blocks_transactions
run-name: dbt_run_streamline_realtime_blocks_transactions
on:
workflow_dispatch:
# schedule:
# # Runs every 10 minutes
# - cron: "0,10,20,30,40,50 * * * *"
env:
USE_VARS: "${{ vars.USE_VARS }}"
DBT_PROFILES_DIR: "${{ vars.DBT_PROFILES_DIR }}"
DBT_VERSION: "${{ vars.DBT_VERSION }}"
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:
called_workflow_template:
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@main
with:
dbt_command: >
dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m 1+models/silver/streamline/realtime/streamline__blocks_realtime.sql 1+models/silver/streamline/realtime/streamline__transactions_realtime.sql
environment: workflow_prod
warehouse: ${{ vars.WAREHOUSE }}
secrets: inherit

View File

@ -1,5 +1,5 @@
name: dbt_run_streamline_realtime
run-name: dbt_run_streamline_realtime
name: dbt_run_streamline_realtime_tx_receipts
run-name: dbt_run_streamline_realtime_tx_receipts
on:
workflow_dispatch:
@ -28,7 +28,7 @@ jobs:
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@main
with:
dbt_command: >
dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m 1+models/silver/streamline/realtime/
dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m 1+models/silver/streamline/realtime/streamline__tx_receipts_realtime.sql
environment: workflow_prod
warehouse: ${{ vars.WAREHOUSE }}
secrets: inherit

View File

@ -1,4 +1,5 @@
workflow_name,workflow_schedule
dbt_run_streamline_realtime,"12,42 * * * *"
dbt_run_scheduled,"22,52 * * * *"
dbt_test_tasks,"25,55 * * * *"
dbt_run_streamline_realtime_blocks_transactions,"12,42 * * * *"
dbt_run_streamline_realtime_tx_receipts,"17,47 * * * *"
dbt_run_scheduled,"25,55 * * * *"
dbt_test_tasks,"28,58 * * * *"

1 workflow_name workflow_schedule
2 dbt_run_streamline_realtime dbt_run_streamline_realtime_blocks_transactions 12,42 * * * *
3 dbt_run_scheduled dbt_run_streamline_realtime_tx_receipts 22,52 * * * * 17,47 * * * *
4 dbt_test_tasks dbt_run_scheduled 25,55 * * * *
5 dbt_test_tasks 28,58 * * * *