Skip to content

Conversation

hildobby
Copy link
Collaborator

@hildobby hildobby commented Oct 2, 2025

this PR fixes this trino error i've never encountered: Error: No catalog handle for partitioning handle: SINGLE

example query with error (this is the target DuneSQL code of bridges_evms.withdrawals which currently has the prod_exclude tag due to this error): https://dune.com/queries/5901070

@jonathandune found that it was a it was the query engine failing to plan the query and the materialising the UNION ALLs fixes the issue.

so bridges_evms_deposits.sql and bridges_evms_withdrawals.sql were each split into the _raw file and the current one, the _raw one joins all EVM chains and removes duplicates, the current one joins prices data

other fixes:

  • merged across chain index ctes into 1 model, and added solana, hyperevm and plasma chain ids
  • fixed evms and crosschain level tests
  • remove hardcoded arbitrum in across macros
  • add deduping for ocasional across withdrawal events emitted twice
  • added across_v3 models to chain-specific models (they were forgotten)
  • added across v3 deduping
  • fixed evms_deposits
  • added deposit_chain_id (withdrawals & flows) and withdrawal_chain_id (deposits & flows) for when the chain id mappings are missing

Note

Materializes EVMS union sources into raw views, adds deposit/withdrawal chain IDs and deduping, replaces Across hardcoded mappings with a shared index, and standardizes flows schemas incl. Across v3.

  • EVMS Refactor:
    • Split bridges_evms_deposits and bridges_evms_withdrawals into _raw union views plus priced aggregates to fix planning issues; updated unique keys and incremental logic; added duplicate_index handling.
  • Schema/Flows Standardization:
    • Added withdrawal_chain_id (deposits) and deposit_chain_id (withdrawals/flows); propagated to crosschain and EVMS flows; updated tests and unique keys.
    • Renamed fields to withdrawal_* consistently and fixed column names in crosschain flows.
  • Across Updates:
    • Replaced inline chain mapping with bridges_across_chain_indexes; added withdrawal_chain_id to deposits and deduped withdrawals (ROW_NUMBER) for v2/v3; removed hardcoded chains.
    • Included Across v3 in chain-specific deposits/withdrawals.
  • Indexes/Metadata:
    • Added new model bridges_across_chain_indexes with extra chains (e.g., Solana, HyperEVM, Plasma); updated CCTP indexes schema.
  • Chain-Specific Models:
    • Propagated new columns and naming fixes across Arbitrum, Avalanche, Base, Ethereum, Optimism, Polygon, Unichain deposits/withdrawals and schemas.

Written by Cursor Bugbot for commit 83d0239. Configure here.

@github-actions github-actions bot marked this pull request as draft October 2, 2025 17:13
@github-actions github-actions bot added WIP work in progress dbt: hourly covers the hourly dbt subproject labels Oct 2, 2025
@hildobby hildobby changed the title fix bridge withdrawal models fix bridge materialised models Oct 3, 2025
@hildobby hildobby changed the title fix bridge materialised models bridges: fix materialised models Oct 3, 2025
@jeff-dude jeff-dude self-assigned this Oct 15, 2025
@jeff-dude jeff-dude added in review Assignee is currently reviewing the PR and removed ready-for-review this PR development is complete, please review labels Oct 15, 2025
@jeff-dude jeff-dude self-requested a review October 16, 2025 17:24
@jeff-dude
Copy link
Member

looks like it's still failing on dupes with the index in place?
i will pause on final review until that is fixed and you tag me

@jeff-dude jeff-dude linked an issue Oct 20, 2025 that may be closed by this pull request
@hildobby
Copy link
Collaborator Author

@jeff-dude it's ready now

@jeff-dude jeff-dude added ready-for-merging and removed in review Assignee is currently reviewing the PR labels Oct 21, 2025
@hildobby
Copy link
Collaborator Author

@jeff-dude I included all changes made in #8833 into this PR, so only this PR needs to be merged now

@jeff-dude jeff-dude merged commit 5ef6d9b into duneanalytics:main Oct 22, 2025
3 of 4 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dbt: hourly covers the hourly dbt subproject ready-for-merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] duplicates in bridges_evms.deposits

2 participants