mirror of
https://github.com/FlipsideCrypto/aurora-models.git
synced 2026-02-06 15:56:50 +00:00
gha tasks
This commit is contained in:
parent
53c4a5bbe9
commit
1ec10f03f2
46
.github/workflows/dbt_alter_gha_task.yml
vendored
Normal file
46
.github/workflows/dbt_alter_gha_task.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
name: dbt_alter_gha_task
|
||||
run-name: dbt_alter_gha_task
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches:
|
||||
- "main"
|
||||
inputs:
|
||||
workflow_name:
|
||||
type: string
|
||||
description: Name of the workflow to perform the action on, no .yml extension
|
||||
required: true
|
||||
task_action:
|
||||
type: choice
|
||||
description: Action to perform
|
||||
required: true
|
||||
options:
|
||||
- SUSPEND
|
||||
- RESUME
|
||||
default: SUSPEND
|
||||
|
||||
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 }}
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_alter_gha_tasks.yml@main
|
||||
with:
|
||||
workflow_name: |
|
||||
${{ inputs.workflow_name }}
|
||||
task_action: |
|
||||
${{ inputs.task_action }}
|
||||
environment: workflow_prod
|
||||
secrets: inherit
|
||||
6
.github/workflows/dbt_run_scheduled.yml
vendored
6
.github/workflows/dbt_run_scheduled.yml
vendored
@ -3,9 +3,9 @@ run-name: dbt_run_scheduled
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Runs "every 10 minutes, 5 mins after the realtime job
|
||||
- cron: "5,15,25,35,45,55 * * * *"
|
||||
# schedule:
|
||||
# # Runs "every 10 minutes, 5 mins after the realtime job
|
||||
# - cron: "5,15,25,35,45,55 * * * *"
|
||||
|
||||
env:
|
||||
USE_VARS: "${{ vars.USE_VARS }}"
|
||||
|
||||
@ -3,9 +3,9 @@ run-name: dbt_run_streamline_realtime
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Runs every 10 minutes
|
||||
- cron: "0,10,20,30,40,50 * * * *"
|
||||
# schedule:
|
||||
# # Runs every 10 minutes
|
||||
# - cron: "0,10,20,30,40,50 * * * *"
|
||||
|
||||
env:
|
||||
USE_VARS: "${{ vars.USE_VARS }}"
|
||||
|
||||
27
.github/workflows/dbt_test_tasks.yml
vendored
Normal file
27
.github/workflows/dbt_test_tasks.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: dbt_test_tasks
|
||||
run-name: dbt_test_tasks
|
||||
|
||||
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 }}
|
||||
|
||||
jobs:
|
||||
called_workflow_template:
|
||||
uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_test_tasks.yml@main
|
||||
secrets: inherit
|
||||
4
data/github_actions__workflows.csv
Normal file
4
data/github_actions__workflows.csv
Normal file
@ -0,0 +1,4 @@
|
||||
workflow_name,workflow_schedule
|
||||
dbt_run_scheduled,"5,15,25,35,45,55 * * * *"
|
||||
dbt_run_streamline_realtime,"0,10,20,30,40,50 * * * *"
|
||||
dbt_test_tasks,"0,30 * * * *"
|
||||
|
@ -48,6 +48,7 @@ vars:
|
||||
UPDATE_SNOWFLAKE_TAGS: True
|
||||
WAIT: 0
|
||||
OBSERV_FULL_TEST: False
|
||||
START_GHA_TASKS: False
|
||||
|
||||
tests:
|
||||
+store_failures: true # all tests
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['gha_tasks']
|
||||
) }}
|
||||
|
||||
{{ fsc_utils.gha_task_current_status_view() }}
|
||||
@ -0,0 +1,16 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: github_actions__current_task_status
|
||||
columns:
|
||||
- name: PIPELINE_ACTIVE
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set:
|
||||
- TRUE
|
||||
- name: SUCCESSES
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set:
|
||||
- 2
|
||||
config:
|
||||
severity: warn
|
||||
5
models/github_actions/github_actions__task_history.sql
Normal file
5
models/github_actions/github_actions__task_history.sql
Normal file
@ -0,0 +1,5 @@
|
||||
{{ config(
|
||||
materialized = 'view'
|
||||
) }}
|
||||
|
||||
{{ fsc_utils.gha_task_history_view() }}
|
||||
@ -0,0 +1,5 @@
|
||||
{{ config(
|
||||
materialized = 'view'
|
||||
) }}
|
||||
|
||||
{{ fsc_utils.gha_task_performance_view() }}
|
||||
5
models/github_actions/github_actions__task_schedule.sql
Normal file
5
models/github_actions/github_actions__task_schedule.sql
Normal file
@ -0,0 +1,5 @@
|
||||
{{ config(
|
||||
materialized = 'view'
|
||||
) }}
|
||||
|
||||
{{ fsc_utils.gha_task_schedule_view() }}
|
||||
5
models/github_actions/github_actions__tasks.sql
Normal file
5
models/github_actions/github_actions__tasks.sql
Normal file
@ -0,0 +1,5 @@
|
||||
{{ config(
|
||||
materialized = 'view'
|
||||
) }}
|
||||
|
||||
{{ fsc_utils.gha_tasks_view() }}
|
||||
@ -24,3 +24,9 @@ sources:
|
||||
schema: silver
|
||||
tables:
|
||||
- name: number_sequence
|
||||
|
||||
- name: github_actions
|
||||
database: aurora
|
||||
schema: github_actions
|
||||
tables:
|
||||
- name: workflows
|
||||
|
||||
@ -2,6 +2,6 @@ packages:
|
||||
- package: calogica/dbt_expectations
|
||||
version: [">=0.4.0", "<0.9.0"]
|
||||
- git: https://github.com/FlipsideCrypto/fsc-utils.git
|
||||
revision: v1.3.0
|
||||
revision: v1.11.0
|
||||
- package: get-select/dbt_snowflake_query_tags
|
||||
version: [">=2.0.0", "<3.0.0"]
|
||||
|
||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
dbt-snowflake>=1.4,<1.5
|
||||
Loading…
Reference in New Issue
Block a user