mirror of
https://github.com/FlipsideCrypto/avalanche-models.git
synced 2026-02-06 13:16:53 +00:00
blocks workflow (#270)
This commit is contained in:
parent
62697a84da
commit
2e47dc070a
@ -1,47 +0,0 @@
|
||||
name: dbt_run_streamline_dexalot_blocks
|
||||
run-name: dbt_run_streamline_dexalot_blocks
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- "main"
|
||||
|
||||
env:
|
||||
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 }}
|
||||
cancel-in-progress: true
|
||||
|
||||
|
||||
|
||||
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: "3.10"
|
||||
cache: "pip"
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
dbt deps
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m "avalanche_models,tag:streamline_dexalot_blocks"
|
||||
@ -6,5 +6,4 @@ dbt_run_scheduled_curated,"35 * * * *"
|
||||
dbt_test_intraday,"37 */4 * * *"
|
||||
dbt_test_tasks,"10 * * * *"
|
||||
dbt_run_streamline_dexalot_chainhead,"50 * * * *"
|
||||
dbt_run_streamline_dexalot_blocks,"8,38 * * * *"
|
||||
dbt_run_streamline_dexalot_non_realtime,"5 * * * *"
|
||||
|
@ -4,7 +4,7 @@
|
||||
unique_key = "block_number",
|
||||
cluster_by = "ROUND(block_number, -3)",
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION on equality(block_number)",
|
||||
tags = ['streamline_dexalot_complete', 'streamline_dexalot_blocks']
|
||||
tags = ['streamline_dexalot_complete']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
materialized = "incremental",
|
||||
unique_key = "block_number",
|
||||
cluster_by = "ROUND(block_number, -3)",
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION on equality(block_number)"
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION on equality(block_number)",
|
||||
tags = ['streamline_dexalot_complete']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
"worker_batch_size" :"1000",
|
||||
"sql_source" :"{{this.identifier}}" }
|
||||
),
|
||||
tags = ['streamline_dexalot_blocks']
|
||||
tags = ['streamline_dexalot_realtime']
|
||||
) }}
|
||||
|
||||
WITH last_3_days AS (
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{{ config (
|
||||
materialized = "view",
|
||||
tags = ['streamline_dexalot_complete','streamline_dexalot_blocks']
|
||||
tags = ['streamline_dexalot_complete']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{{ config (
|
||||
materialized = "view",
|
||||
tags = ['streamline_dexalot_complete','streamline_dexalot_blocks']
|
||||
tags = ['streamline_dexalot_complete']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{{ config (
|
||||
materialized = 'table',
|
||||
tags = ['streamline_dexalot_blocks']
|
||||
tags = ['streamline_dexalot_complete']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
Loading…
Reference in New Issue
Block a user