Skip to content

Conversation

@jeff-dude
Copy link
Member

@jeff-dude jeff-dude commented Nov 7, 2025

Note

Refactors Thorchain silver models to normalized, day-based schemas and rewrites gold fact models to join core blocks with new surrogate keys/partitioning, adding thorchain_core_transfers and extensive schema tests.

  • Pipeline standardization (Silver):
    • Normalize inputs, deduplicate via row_number, and standardize columns (block_timestamp, day) across silver models (add/bond/swap/stake/withdraw/events, prices, block_log, pool depths/fees/stats, rewards, transfers, TVL, block rewards).
    • Materialization/partitioning changes: several models switched to table/view; keys/partitions moved to day; removed legacy time columns; recalculated daily aggregates.
    • Reworked pricing and daily computations (prices, block_rewards, daily_earnings, daily_tvl, pool_block_statistics) to use day-level logic.
  • Facts (Gold):
    • Update all gold DeFi fact models to:
      • Join thorchain_core_block for dim_block_id, use block_timestamp incremental predicates, and new surrogate keys.
      • Partition by day where applicable and adjust unique keys.
    • Add thorchain_core_transfers and remove legacy thorchain_defi_transfers.
  • Schema/tests:
    • Overhaul _schema.yml with unique-combination tests aligned to new keys (primarily day + id/_unique_key).

Written by Cursor Bugbot for commit 96f65da. Configure here.

@github-actions github-actions bot added WIP work in progress dbt: daily covers the Daily dbt subproject labels Nov 7, 2025
@jeff-dude jeff-dude changed the title thorchain: update gold defi_daily_earnings thorchain: update model logic Nov 12, 2025
@jeff-dude jeff-dude marked this pull request as ready for review November 13, 2025 16:14
@github-actions github-actions bot added ready-for-review this PR development is complete, please review and removed WIP work in progress labels Nov 13, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment @cursor review or bugbot run to trigger another review on this PR

@jeff-dude jeff-dude merged commit ad0599b into main Nov 13, 2025
2 of 3 checks passed
@jeff-dude jeff-dude deleted the thorchain-updates branch November 13, 2025 16:29
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dbt: daily covers the Daily dbt subproject ready-for-review this PR development is complete, please review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants