mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 09:41:44 +00:00
split core/non-core and simplify all tags
This commit is contained in:
parent
f3244e35da
commit
dff2c332e7
6
.github/workflows/dbt_run_scheduled_core.yml
vendored
6
.github/workflows/dbt_run_scheduled_core.yml
vendored
@ -4,8 +4,8 @@ run-name: dbt_run_scheduled_core
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Runs hourly on minute 25 (see https://crontab.guru)
|
||||
- cron: "25 * * * *"
|
||||
# Runs twice an hour on minutes 0 and 30 (see https://crontab.guru)
|
||||
- cron: "0,30 * * * *"
|
||||
|
||||
env:
|
||||
USE_VARS: "${{ vars.USE_VARS }}"
|
||||
@ -43,7 +43,7 @@ jobs:
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt seed;
|
||||
dbt run -s tag:scheduled_core tag:scheduled_non_core models/gold --exclude tag:deprecated;
|
||||
dbt run -s tag:scheduled_core --exclude tag:deprecated;
|
||||
- name: Store logs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
name: dbt_run_atlas
|
||||
run-name: dbt_run_atlas
|
||||
name: dbt_run_scheduled_non_core
|
||||
run-name: dbt_run_scheduled_non_core
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# Runs once per day at 0 UTC
|
||||
- cron: "0 0 * * *"
|
||||
# Runs hourly on minute 45 (see https://crontab.guru)
|
||||
- cron: "45 * * * *"
|
||||
|
||||
env:
|
||||
USE_VARS: "${{ vars.USE_VARS }}"
|
||||
@ -42,8 +42,8 @@ jobs:
|
||||
|
||||
- name: Run DBT Jobs
|
||||
run: |
|
||||
dbt run -s tag:atlas
|
||||
|
||||
dbt seed;
|
||||
dbt run -s tag:scheduled_non_core --exclude tag:deprecated tag:unscheduled;
|
||||
- name: Store logs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
@ -1,6 +1,6 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['core', 'nft', 'pagoda', 'deprecated']
|
||||
tags = ['deprecated']
|
||||
) }}
|
||||
-- reminder update bi_analytics with deprecating flag
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH flipside_labels AS (
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
unique_key = 'actions_id',
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,receipt_id,receipt_receiver_id,receipt_signer_id,receipt_predecessor_id);",
|
||||
tags = ['actions', 'curated', 'scheduled_core', 'grail']
|
||||
tags = ['scheduled_core']
|
||||
) }}
|
||||
-- depends_on: {{ ref('silver__transactions_final') }}
|
||||
-- depends_on: {{ ref('silver__receipts_final') }}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core']
|
||||
tags = ['scheduled_core']
|
||||
) }}
|
||||
|
||||
WITH blocks AS (
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['core', 'activity']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH github_data AS (
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core']
|
||||
tags = ['scheduled_core']
|
||||
) }}
|
||||
|
||||
WITH logs AS (
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core']
|
||||
tags = ['scheduled_core']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core']
|
||||
tags = ['scheduled_core']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'DEFI, BRIDGING' }} },
|
||||
tags = ['core', 'grail']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH fact_bridging AS (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'DEFI, SWAPS' }} },
|
||||
tags = ['core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH dex_swaps AS (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'DEFI, LENDING' }} },
|
||||
tags = ['core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH lending AS (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'DEFI, BRIDGING' }} },
|
||||
tags = ['core', 'grail']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'DEFI, SWAPS' }} },
|
||||
tags = ['core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
cluster_by = ['block_timestamp::DATE'],
|
||||
incremental_predicates = ["dynamic_range_predicate_custom","block_timestamp::date"],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,receipt_id,token_id);",
|
||||
tags = ['intents','curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
-- depends_on: {{ ref('core__ez_actions') }}
|
||||
-- depends_on: {{ ref('silver__logs_s3') }}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'DEFI, LENDING' }} },
|
||||
tags = ['core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH burrow AS (
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core', 'governance'],
|
||||
tags = ['scheduled_non_core'],
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'STAKING, GOVERNANCE' }}}
|
||||
) }}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core', 'governance'],
|
||||
tags = ['scheduled_non_core'],
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'STAKING, GOVERNANCE' }}}
|
||||
) }}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core', 'governance'],
|
||||
tags = ['scheduled_non_core'],
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'STAKING, GOVERNANCE' }}}
|
||||
) }}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core', 'governance'],
|
||||
tags = ['scheduled_non_core'],
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'STAKING, GOVERNANCE' }}}
|
||||
) }}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
secure = false,
|
||||
tags = ['core', 'governance'],
|
||||
tags = ['scheduled_non_core'],
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'STAKING, GOVERNANCE' }}}
|
||||
) }}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['core', 'nft', 'livequery', 'nearblocks']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH nft_contract_metadata AS (
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'NFT' }}},
|
||||
tags = ['core', 'nft']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH nft_sales AS (
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'NFT' }}},
|
||||
tags = ['core', 'nft']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH nft_mints AS (
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
meta ={ 'database_tags':{ 'table':{ 'PURPOSE': 'NFT' }}},
|
||||
tags = ['core', 'nft']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
persist_docs ={ "relation": true,
|
||||
"columns": true }
|
||||
"columns": true },
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
persist_docs ={ "relation": true,
|
||||
"columns": true }
|
||||
"columns": true },
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
persist_docs ={ "relation": true,
|
||||
"columns": true }
|
||||
"columns": true },
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
persist_docs ={ "relation": true,
|
||||
"columns": true }
|
||||
"columns": true },
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH prices AS (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = "table",
|
||||
cluster_by = ["utc_date"],
|
||||
unique_key = "atlas_supply_id",
|
||||
tags = ['atlas', 'scheduled_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH daily_lockup_locked_balances AS (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = "table",
|
||||
cluster_by = ["utc_date"],
|
||||
unique_key = "atlas_daily_lockup_locked_balances_id",
|
||||
tags = ['atlas', 'scheduled_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH lockup_receipts AS (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = "table",
|
||||
cluster_by = ["utc_date"],
|
||||
unique_key = "atlas_daily_lockup_staking_balances_id",
|
||||
tags = ['atlas', 'scheduled_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH lockup_receipts AS (
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
cluster_by = ["utc_date"],
|
||||
unique_key = "atlas_daily_staked_supply_id",
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
tags = ['atlas', 'scheduled_core'],
|
||||
tags = ['scheduled_non_core'],
|
||||
enabled = False
|
||||
) }}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = "table",
|
||||
cluster_by = ["epoch_id"],
|
||||
unique_key = "atlas_epochs_id",
|
||||
tags = ['atlas', 'scheduled_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH blocks AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
incremental_strategy = "merge",
|
||||
incremental_predicates = ["dynamic_range_predicate_custom","block_timestamp::date"],
|
||||
tags = ['atlas', 'scheduled_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH receipts AS (
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
{{ config(
|
||||
materialized = 'view'
|
||||
materialized = 'view',
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
unique_key = "log_id",
|
||||
incremental_strategy = "merge",
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,receipt_id);",
|
||||
tags = ['curated', 'scheduled_core']
|
||||
tags = ['scheduled_core']
|
||||
) }}
|
||||
|
||||
WITH receipts AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = "burrow_borrows_id",
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH --borrows from Burrow LendingPool contracts
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = "burrow_collaterals_id",
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = "burrow_deposits_id",
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH actions AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = "burrow_repays_id",
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH actions AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = "burrow_withdraws_id",
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH actions AS (
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
unique_key = 'dex_swaps_v2_id',
|
||||
cluster_by = ['block_timestamp::DATE'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,receipt_object_id,receiver_id,signer_id,token_out,token_in);",
|
||||
tags = ['curated','scheduled_non_core'],
|
||||
tags = ['scheduled_non_core'],
|
||||
) }}
|
||||
|
||||
-- depends on {{ ref('silver__logs_s3') }}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = ['_res_id'],
|
||||
cluster_by = ['_inserted_timestamp::DATE'],
|
||||
tags = ['activity','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH github AS (
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = 'address',
|
||||
cluster_by = 'address',
|
||||
tags = ['labels','scheduled_non_core'],
|
||||
tags = ['scheduled_non_core'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(address); DELETE FROM {{ this }} WHERE _is_deleted = TRUE;"
|
||||
) }}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'table',
|
||||
unique_key = 'date_day',
|
||||
tags = ['labels','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH dim_dates AS (
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
materialized = 'table',
|
||||
cluster_by = 'wallet_address',
|
||||
unique_key = 'wallet_address',
|
||||
tags = ['labels','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH labels AS (
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = 'contract_address',
|
||||
incremental_strategy = 'merge',
|
||||
tags = ['livequery', 'nearblocks','scheduled_non_core'],
|
||||
tags = ['scheduled_non_core'],
|
||||
) }}
|
||||
|
||||
WITH livequery_results AS (
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
unique_key = 'token_contract'
|
||||
unique_key = 'token_contract',
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH labels_seed AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
unique_key = 'tx_hash',
|
||||
cluster_by = [ 'block_timestamp::date'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,lockup_account_id,owner_account_id);",
|
||||
tags = ['curated', 'scheduled_non_core'],
|
||||
tags = ['scheduled_non_core'],
|
||||
) }}
|
||||
|
||||
{% if execute %}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
unique_key = 'nft_sales_id',
|
||||
incremental_strategy = 'delete+insert',
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,seller_address,buyer_address,nft_address,token_id);",
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH mintbase_nft_sales AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
unique_key = 'nft_mintbase_sales_id',
|
||||
incremental_strategy = 'merge',
|
||||
incremental_predicates = ["dynamic_range_predicate_custom", "block_timestamp::date"],
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH actions AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
unique_key = 'nft_other_sales_id',
|
||||
incremental_strategy = 'merge',
|
||||
incremental_predicates = ["dynamic_range_predicate_custom","block_timestamp::date"],
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH actions AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
unique_key = 'nft_paras_sales_id',
|
||||
incremental_strategy = 'merge',
|
||||
incremental_predicates = ["dynamic_range_predicate_custom","block_timestamp::date"],
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH actions AS (
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
unique_key = 'nft_transfers_id',
|
||||
incremental_strategy = 'merge',
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,receipt_id,contract_address,from_address,to_address,token_id);",
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH nft_logs AS (
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
incremental_strategy = "merge",
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,tx_signer,tx_receiver,receipt_object_id,receiver_id,signer_id,owner_id,token_id);",
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH logs AS (
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
unique_key = 'complete_token_prices_id',
|
||||
cluster_by = ['HOUR::DATE'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(token_address,symbol);",
|
||||
tags = ['scheduled_non_core', 'grail']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH complete_token_prices AS (
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
cluster_by = ['date_day'],
|
||||
unique_key = '_id',
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(address);",
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH pool_balances AS (
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{{ config(
|
||||
materialized = 'table',
|
||||
unique_key = 'tx_hash',
|
||||
tags = ['curated','scheduled_non_core'],
|
||||
tags = ['scheduled_non_core'],
|
||||
cluster_by = ['block_timestamp::date','_partition_by_block_number'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,receiver_id,signer_id);",
|
||||
) }}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
incremental_strategy = 'merge',
|
||||
incremental_predicates = ["dynamic_range_predicate_custom","block_timestamp::date"],
|
||||
unique_key = 'pool_events_id',
|
||||
tags = ['curated','scheduled_non_core'],
|
||||
tags = ['scheduled_non_core'],
|
||||
cluster_by = ['_partition_by_block_number', 'block_timestamp::date']
|
||||
) }}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
unique_key = 'staking_actions_v2_id',
|
||||
incremental_strategy = 'merge',
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
tags = ['curated', 'scheduled_non_core'],
|
||||
tags = ['scheduled_non_core'],
|
||||
cluster_by = [ 'block_timestamp::date','_partition_by_block_number'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,receiver_id,signer_id);",
|
||||
) }}
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
unique_key = '_epoch_id',
|
||||
incremental_strategy = 'merge',
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
tags = ['curated','scheduled_non_core'],
|
||||
tags = ['scheduled_non_core'],
|
||||
cluster_by = ['block_id']
|
||||
) }}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
unique_key = 'staking_pools_id',
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,receipt_id,owner,address);",
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH actions AS (
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
incremental_strategy = 'delete+insert',
|
||||
unique_key = "block_timestamp_hour",
|
||||
cluster_by = ['block_timestamp_hour::DATE'],
|
||||
tags = ['stats','scheduled_non_core']
|
||||
tags = ['stats', 'scheduled_non_core']
|
||||
) }}
|
||||
/* run incremental timestamp value first then use it as a static value */
|
||||
{% if execute %}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = 'bridge_allbridge_id',
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
tags = ['curated','scheduled_non_core', 'grail'],
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH functioncall AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = 'bridge_multichain_id',
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
tags = ['curated', 'exclude_from_schedule'],
|
||||
tags = ['scheduled_non_core', 'unscheduled'],
|
||||
) }}
|
||||
|
||||
WITH functioncall AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = 'bridge_rainbow_id',
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
tags = ['curated','scheduled_non_core', 'grail'],
|
||||
tags = ['scheduled_non_core'],
|
||||
) }}
|
||||
|
||||
WITH functioncall AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
unique_key = 'bridge_wormhole_id',
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
tags = ['curated','scheduled_non_core', 'grail'],
|
||||
tags = ['scheduled_non_core'],
|
||||
) }}
|
||||
|
||||
WITH functioncall AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
unique_key = 'token_transfer_deposit_id',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH transfers AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
unique_key = 'token_transfer_native_id',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH transfers AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
incremental_predicates = ["dynamic_range_predicate_custom","block_timestamp::date"],
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
unique_key = 'transfers_event_id',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH ft_transfer_logs AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
unique_key = 'transfers_id',
|
||||
incremental_strategy = 'merge',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
unique_key = 'transfers_liquidity_id',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH liquidity_logs AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
merge_exclude_columns = ["inserted_timestamp"],
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
unique_key = 'mint_id',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH ft_mint_logs AS (
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
cluster_by = ['block_timestamp::DATE', 'modified_timestamp::DATE'],
|
||||
unique_key = 'transfers_orders_id',
|
||||
incremental_strategy = 'merge',
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
WITH order_logs AS (
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
unique_key = 'transfers_complete_id',
|
||||
incremental_strategy = 'merge',
|
||||
incremental_predicates = ["dynamic_range_predicate_custom","block_timestamp::date"],
|
||||
tags = ['curated','scheduled_non_core']
|
||||
tags = ['scheduled_non_core']
|
||||
) }}
|
||||
|
||||
{% if execute %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user