fix(dex): remove row_number() dedup from hyperevm base trades#9513
fix(dex): remove row_number() dedup from hyperevm base trades#9513
Conversation
…move deduplication logic from SQL queries - Added data tests for unique combinations of blockchain, project, version, tx_hash, and evt_index in the schema file for dex_hyperevm_base_trades. - Removed deduplication logic from SQL queries in multiple platform models (hybra_v3, hyperswap_v2, hyperswap_v3, prjx_v3) as source tables have been verified to be duplicate-free. This change enhances data integrity checks while simplifying the SQL logic.
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
…ades Old seed transactions no longer exist in source tables (likely removed during a data reprocessing). Replaced with recent, production-verified transactions to fix check_dex_base_trades_seed CI failures
There was a problem hiding this comment.
The code changes look good, but seeing that we have dropped the orginal seed trades is alarming.
Looking at the rowcounts between Dune and CI, we can't merge this as is and need to get to the bottom of why the models are suddenly dropping historical rows.
https://dune.com/queries/6935973/10842220
|
The row count diff is a source data issue, not from the dedup removal. Both Production has more rows from incremental accumulation before the reprocessing. The original seeds were stale for the same reason.
Verification: source ranges · zero swaps below cutoff Opened CUR2-1955 to track the source data investigation separately. |
Removes the defensive row_number() dedup guard from 5 hyperevm models.
Was added as a precaution — verified all source tables are clean so it's
dead weight.
Verified 0 duplicates across all sources:
Also added unique_combination_of_columns test on dex_hyperevm_base_trades
(was missing, all platform models already had it). If sources ever produce
duplicates the MERGE will fail loudly in CI — intentional.