From 5512d862a92824d31015bdccb95317edfba82381 Mon Sep 17 00:00:00 2001 From: WHYTEWYLL <49686519+WHYTEWYLL@users.noreply.github.com> Date: Wed, 13 Mar 2024 13:48:36 -0600 Subject: [PATCH] update workflows --- .github/workflows/dbt_run_atlas.yml | 35 ++++++++++++++----- .../workflows/dbt_run_daily_dev_refresh.yml | 35 ++++++++++++++----- .github/workflows/dbt_run_deployment.yml | 34 ++++++++++++++---- .../workflows/dbt_run_livequery_weekly.yml | 35 ++++++++++++++----- .github/workflows/dbt_run_nearblocks_api.yml | 35 ++++++++++++++----- .github/workflows/dbt_run_s3_sync.yml | 35 ++++++++++++++----- .github/workflows/dbt_run_scheduled.yml | 35 ++++++++++++++----- 7 files changed, 189 insertions(+), 55 deletions(-) diff --git a/.github/workflows/dbt_run_atlas.yml b/.github/workflows/dbt_run_atlas.yml index cbbc3f2..249f03f 100644 --- a/.github/workflows/dbt_run_atlas.yml +++ b/.github/workflows/dbt_run_atlas.yml @@ -24,11 +24,30 @@ concurrency: group: ${{ github.workflow }} jobs: - called_workflow_template: - uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@AN-4374/upgrade-dbt-1.7 - with: - dbt_command: > - dbt run -s tag:atlas - environment: workflow_prod - warehouse: ${{ vars.WAREHOUSE }} - secrets: inherit + dbt: + 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 -s tag:atlas + + - name: Store logs + uses: actions/upload-artifact@v3 + with: + name: dbt-logs + path: | + logs + target diff --git a/.github/workflows/dbt_run_daily_dev_refresh.yml b/.github/workflows/dbt_run_daily_dev_refresh.yml index ba6a8db..9956003 100644 --- a/.github/workflows/dbt_run_daily_dev_refresh.yml +++ b/.github/workflows/dbt_run_daily_dev_refresh.yml @@ -24,11 +24,30 @@ concurrency: group: ${{ github.workflow }} jobs: - called_workflow_template: - uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@AN-4374/upgrade-dbt-1.7 - with: - dbt_command: > - dbt run-operation run_sp_create_prod_clone; dbt run -s models/gold - environment: workflow_prod - warehouse: ${{ vars.WAREHOUSE }} - secrets: inherit + dbt: + 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-operation run_sp_create_prod_clone; dbt run -s models/gold + + - name: Store logs + uses: actions/upload-artifact@v3 + with: + name: dbt-logs + path: | + logs + target diff --git a/.github/workflows/dbt_run_deployment.yml b/.github/workflows/dbt_run_deployment.yml index dc5a8d5..e9aa392 100644 --- a/.github/workflows/dbt_run_deployment.yml +++ b/.github/workflows/dbt_run_deployment.yml @@ -37,10 +37,30 @@ concurrency: group: ${{ github.workflow }} jobs: - called_workflow_template: - uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_deployment_template.yml@AN-4374/upgrade-dbt-1.7 - with: - dbt_command: | - ${{ inputs.dbt_command }} - warehouse: ${{ inputs.WAREHOUSE }} - secrets: inherit + dbt: + 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: | + ${{ inputs.dbt_command }} + + - name: Store logs + uses: actions/upload-artifact@v3 + with: + name: dbt-logs + path: | + logs + target diff --git a/.github/workflows/dbt_run_livequery_weekly.yml b/.github/workflows/dbt_run_livequery_weekly.yml index cf5e251..cc510ed 100644 --- a/.github/workflows/dbt_run_livequery_weekly.yml +++ b/.github/workflows/dbt_run_livequery_weekly.yml @@ -24,11 +24,30 @@ concurrency: group: ${{ github.workflow }} jobs: - called_workflow_template: - uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@AN-4374/upgrade-dbt-1.7 - with: - dbt_command: > - dbt run -s tag:nearblocks tag:activity - environment: workflow_prod - warehouse: ${{ vars.WAREHOUSE }} - secrets: inherit + dbt: + 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 -s tag:nearblocks tag:activity + + - name: Store logs + uses: actions/upload-artifact@v3 + with: + name: dbt-logs + path: | + logs + target diff --git a/.github/workflows/dbt_run_nearblocks_api.yml b/.github/workflows/dbt_run_nearblocks_api.yml index a762d01..986e5e2 100644 --- a/.github/workflows/dbt_run_nearblocks_api.yml +++ b/.github/workflows/dbt_run_nearblocks_api.yml @@ -25,11 +25,30 @@ concurrency: group: ${{ github.workflow }} jobs: - called_workflow_template: - uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@AN-4374/upgrade-dbt-1.7 - with: - dbt_command: > - dbt run-operation get_nearblocks_fts - environment: workflow_prod - warehouse: ${{ vars.WAREHOUSE }} - secrets: inherit + dbt: + 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-operation get_nearblocks_fts + + - name: Store logs + uses: actions/upload-artifact@v3 + with: + name: dbt-logs + path: | + logs + target diff --git a/.github/workflows/dbt_run_s3_sync.yml b/.github/workflows/dbt_run_s3_sync.yml index ddfa0a8..4762418 100644 --- a/.github/workflows/dbt_run_s3_sync.yml +++ b/.github/workflows/dbt_run_s3_sync.yml @@ -23,11 +23,30 @@ concurrency: group: ${{ github.workflow }} jobs: - called_workflow_template: - uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@AN-4374/upgrade-dbt-1.7 - with: - dbt_command: > - dbt run --vars {"S3_LOOKBACK_HOURS":-6} -m models/silver/streamline/streamline__s3_sync.sql - environment: workflow_prod - warehouse: ${{ vars.SYNC_WAREHOUSE }} - secrets: inherit + dbt: + 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 {"S3_LOOKBACK_HOURS":-6} -m models/silver/streamline/streamline__s3_sync.sql + + - name: Store logs + uses: actions/upload-artifact@v3 + with: + name: dbt-logs + path: | + logs + target diff --git a/.github/workflows/dbt_run_scheduled.yml b/.github/workflows/dbt_run_scheduled.yml index 210877d..44a91a0 100644 --- a/.github/workflows/dbt_run_scheduled.yml +++ b/.github/workflows/dbt_run_scheduled.yml @@ -24,11 +24,30 @@ concurrency: group: ${{ github.workflow }} jobs: - called_workflow_template: - uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@AN-4374/upgrade-dbt-1.7 - with: - dbt_command: > - dbt seed; dbt run -s models/bronze tag:helper tag:load+ tag:labels+ --exclude streamline__s3_sync tag:livequery tag:atlas tag:exclude_from_schedule - environment: workflow_prod - warehouse: ${{ vars.WAREHOUSE }} - secrets: inherit + dbt: + 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 seed; dbt run -s models/bronze tag:helper tag:load+ tag:labels+ --exclude streamline__s3_sync tag:livequery tag:atlas tag:exclude_from_schedule + + - name: Store logs + uses: actions/upload-artifact@v3 + with: + name: dbt-logs + path: | + logs + target