mirror of
https://github.com/FlipsideCrypto/polygon-models.git
synced 2026-02-06 13:22:04 +00:00
parent
44b1603966
commit
16a7fbb888
45
.github/workflows/dbt_run_scheduled_curated.yml
vendored
Normal file
45
.github/workflows/dbt_run_scheduled_curated.yml
vendored
Normal 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"
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
full_refresh = false,
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH pools_registered AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
full_refresh = false,
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH contract_deployments AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH pool_events AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH pools AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH pool_creation AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH contract_deployments AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH pool_creation AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH pool_creation AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH pool_creation AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH pool_creation AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'incremental',
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = 'block_number',
|
||||
tags = ['non_realtime']
|
||||
tags = ['curated']
|
||||
) }}
|
||||
|
||||
WITH pool_creation AS (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
Loading…
Reference in New Issue
Block a user