mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 11:06:45 +00:00
* add: model to backfill * fix: node's string format * add tags * upd collection model * mainnet21 hardcoded collections history model * del tag * mainnet 21 getblock * tag for 21 * realtime models * alias num as height * realtime tags * add missing tag and newlines * backfiller * backfiller * move script to folder (renamed) python, upd test accordingly w dir name ch * upd script to accept model input, update jobs per method call * error w use_dev arg * add: silver mdoels * limit backfill job in python script * rename silver dbt models to streamline_ and move into silver/core * explicit casting to silver streamline models * add documentation to silver streamline models * run only current mainnet and history mainnet 22 first * activate schedule for gha * del hardcoded mainnet models * move history modes out of subdirs into history dir * fix GHA vars * del upstream 1+ from history step * del tag --------- Co-authored-by: Jack Forgash <jmfxyz@pm.me>
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: dbt_run_streamline_blocks
|
|
run-name: dbt_run_streamline_blocks
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# Runs on minute 15 (see https://crontab.guru)
|
|
- cron: "15 * * * *"
|
|
|
|
env:
|
|
USE_VARS: "${{ vars.USE_VARS }}"
|
|
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: "3.10"
|
|
cache: "pip"
|
|
|
|
- name: install dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
dbt deps
|
|
|
|
- name: Run DBT Realtime
|
|
run: |
|
|
dbt run -s 1+streamline__get_blocks_realtime --vars '{"STREAMLINE_INVOKE_STREAMS": True}'
|
|
|
|
- name: Run DBT History Jobs - Mainnet22
|
|
run: |
|
|
dbt run -s 1+streamline__get_blocks_history --vars '{"STREAMLINE_INVOKE_STREAMS": True, "node_url": "access-001.mainnet22.nodes.onflow.org:9000", "start_block": 47169687, "end_block": 55114466}'
|