diff --git a/.github/workflows/dbt_run_api_feeder_table.yml b/.github/workflows/dbt_run_api_feeder_table.yml new file mode 100644 index 00000000..bac11ec1 --- /dev/null +++ b/.github/workflows/dbt_run_api_feeder_table.yml @@ -0,0 +1,35 @@ +name: dbt_run_api_feeder_table +run-name: dbt_run_api_feeder_table + +on: + push: + branches: + - main + schedule: + # Runs "at 8:00 UTC" (see https://crontab.guru) + - cron: '0 8 * * *' + +env: + DBT_PROFILES_DIR: ./ + + ACCOUNT: "${{ secrets.ACCOUNT }}" + ROLE: "${{ secrets.ROLE }}" + USER: "${{ secrets.USER }}" + PASSWORD: "${{ secrets.PASSWORD }}" + REGION: "${{ secrets.REGION }}" + DATABASE_DEV: "${{ secrets.DATABASE_DEV }}" + DATABASE_PROD: "${{ secrets.DATABASE_PROD }}" + WAREHOUSE_DEV: "${{ secrets.WAREHOUSE_DEV }}" + WAREHOUSE_PROD: "${{ secrets.WAREHOUSE_PROD }}" + SCHEMA: "${{ secrets.SCHEMA }}" + + +jobs: + called_workflow_template: + uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@main + with: + dbt_command: '["dbt run -m models/silver/api_udf"]' + secrets: inherit # pass all secrets + + + diff --git a/.github/workflows/dbt_run_dev_refresh.yml b/.github/workflows/dbt_run_dev_refresh.yml new file mode 100644 index 00000000..fc90247f --- /dev/null +++ b/.github/workflows/dbt_run_dev_refresh.yml @@ -0,0 +1,35 @@ +name: dbt_run_dev_refresh +run-name: dbt_run_dev_refresh + +on: + push: + branches: + - main + schedule: + # Runs "at 9:00 UTC" (see https://crontab.guru) + - cron: '0 9 * * *' + +env: + DBT_PROFILES_DIR: ./ + + ACCOUNT: "${{ secrets.ACCOUNT }}" + ROLE: "${{ secrets.ROLE }}" + USER: "${{ secrets.USER }}" + PASSWORD: "${{ secrets.PASSWORD }}" + REGION: "${{ secrets.REGION }}" + DATABASE_DEV: "${{ secrets.DATABASE_DEV }}" + DATABASE_PROD: "${{ secrets.DATABASE_PROD }}" + WAREHOUSE_DEV: "${{ secrets.WAREHOUSE_DEV }}" + WAREHOUSE_PROD: "${{ secrets.WAREHOUSE_PROD }}" + SCHEMA: "${{ secrets.SCHEMA }}" + + +jobs: + called_workflow_template: + uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@main + with: + dbt_command: '["dbt run-operation run_sp_create_prod_clone"]' + secrets: inherit # pass all secrets + + + diff --git a/.github/workflows/dbt_run_scheduled.yml b/.github/workflows/dbt_run_incremental.yml similarity index 83% rename from .github/workflows/dbt_run_scheduled.yml rename to .github/workflows/dbt_run_incremental.yml index b73fb80c..80f871fd 100644 --- a/.github/workflows/dbt_run_scheduled.yml +++ b/.github/workflows/dbt_run_incremental.yml @@ -6,8 +6,8 @@ on: branches: - main schedule: - # Runs "every 6 hours" (see https://crontab.guru) - - cron: '0 */6 * * *' + # Runs "every 2 hours" (see https://crontab.guru) + - cron: '0 */2 * * *' env: DBT_PROFILES_DIR: ./ @@ -28,7 +28,7 @@ jobs: called_workflow_template: uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@main with: - dbt_command: '["dbt run -m ./models/streamline/*"]' + dbt_command: '["dbt run --exclude models/silver/api_udf"]' secrets: inherit # pass all secrets diff --git a/.github/workflows/dbt_test.yml b/.github/workflows/dbt_test.yml new file mode 100644 index 00000000..1866e952 --- /dev/null +++ b/.github/workflows/dbt_test.yml @@ -0,0 +1,35 @@ +name: dbt_test +run-name: dbt_test + +on: + push: + branches: + - main + schedule: + # Runs "at 9:00 UTC" (see https://crontab.guru) + - cron: '0 9 * * *' + +env: + DBT_PROFILES_DIR: ./ + + ACCOUNT: "${{ secrets.ACCOUNT }}" + ROLE: "${{ secrets.ROLE }}" + USER: "${{ secrets.USER }}" + PASSWORD: "${{ secrets.PASSWORD }}" + REGION: "${{ secrets.REGION }}" + DATABASE_DEV: "${{ secrets.DATABASE_DEV }}" + DATABASE_PROD: "${{ secrets.DATABASE_PROD }}" + WAREHOUSE_DEV: "${{ secrets.WAREHOUSE_DEV }}" + WAREHOUSE_PROD: "${{ secrets.WAREHOUSE_PROD }}" + SCHEMA: "${{ secrets.SCHEMA }}" + + +jobs: + called_workflow_template: + uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_run_template.yml@main + with: + dbt_command: '["dbt test"]' + secrets: inherit # pass all secrets + + +