back off curated (#285)

* back off curated

* 45
This commit is contained in:
Austin 2023-10-30 12:01:31 -04:00 committed by GitHub
parent 44b1603966
commit 16a7fbb888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 79 additions and 34 deletions

View File

@ -0,0 +1,45 @@
name: dbt_run_scheduled_curated
run-name: dbt_run_scheduled_curated
on:
workflow_dispatch:
schedule:
# Runs at minutes 15 and 45 (see https://crontab.guru)
- cron: '15,45 * * * *'
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:
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 -m "polygon_models,tag:curated"

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = ['block_number','platform_name','platform_exchange_version'],
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH nft_base_models AS (

View File

@ -4,7 +4,7 @@
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION on equality(contract_address, tx_hash)",
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH base AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH seaport_fees_wallet AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH seaport_fees_wallet AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH seaport_fees_wallet AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
full_refresh = false,
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pools_registered AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pool_name AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
full_refresh = false,
tags = ['non_realtime']
tags = ['curated']
) }}
WITH contract_deployments AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pool_meta AS (

View File

@ -2,7 +2,7 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pool_events AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pools AS (

View File

@ -2,7 +2,7 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pools AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pools AS (

View File

@ -2,7 +2,7 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pool_creation AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pools AS (

View File

@ -2,7 +2,7 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
tags = ['non_realtime']
tags = ['curated']
) }}
WITH contract_deployments AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pools AS (

View File

@ -2,7 +2,7 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pool_creation AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pools AS (

View File

@ -2,7 +2,7 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pool_creation AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pools AS (

View File

@ -2,7 +2,7 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pool_creation AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pools AS (

View File

@ -2,7 +2,7 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pool_creation AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pools AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['_inserted_timestamp::DATE'],
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pool_creation AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH base_swaps AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = ['block_number','platform','version'],
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH contracts AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = ['block_number','platform','version'],
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH contracts AS (

View File

@ -2,7 +2,7 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
tags = ['non_realtime']
tags = ['curated']
) }}
WITH pool_creation AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH pools AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'created_block',
cluster_by = ['_inserted_timestamp::DATE'],
tags = ['non_realtime']
tags = ['curated']
) }}
WITH created_pools AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH base_swaps AS (

View File

@ -3,7 +3,7 @@
incremental_strategy = 'delete+insert',
unique_key = 'block_number',
cluster_by = ['block_timestamp::DATE'],
tags = ['non_realtime','reorg']
tags = ['curated','reorg']
) }}
WITH router_swaps_base AS (