add DFlow aggregator swaps for Solana#9325
add DFlow aggregator swaps for Solana#9325sq-intern wants to merge 3 commits intoduneanalytics:mainfrom
Conversation
PR SummaryMedium Risk Overview The model enriches swaps by joining to Written by Cursor Bugbot for commit 9f0e57b. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
| file_format = 'delta', | ||
| incremental_strategy = 'merge', | ||
| incremental_predicates = [incremental_predicate('DBT_INTERNAL_DEST.block_time')], | ||
| unique_key = ['block_month', 'tx_id', 'input_mint', 'output_mint', 'input_amount', 'output_amount'], |
There was a problem hiding this comment.
Unique key missing instruction indices causes silent data loss
High Severity
The unique_key uses input_amount and output_amount instead of instruction indices (evt_outer_instruction_index, evt_inner_instruction_index) to distinguish rows. If a transaction contains two identical swaps through the same AMM with the same mints and amounts, one row will be silently dropped during the incremental merge. The comparable Jupiter aggregator models use log_index (derived from instruction indices) for this purpose. The columns are already selected in the query but aren't used in the key. The unique_combination_of_columns data test in the schema file has the same gap.
Additional Locations (1)
| @@ -0,0 +1,61 @@ | |||
| version: 2 | |||
There was a problem hiding this comment.
Schema filename has typo with double letter
Low Severity
The schema file is named dfllow_solana_aggregator_schema.yml with a double 'l' instead of dflow_solana_aggregator_schema.yml. While dbt will still find and process it, this inconsistency with the model and directory naming (dflow) is confusing and makes the file harder to locate.


Thank you for contributing to Spellbook 🪄
Please open the PR in draft and mark as ready when you want to request a review.
Description: Adds DFlow aggregator swap spell that decodes swap events routed through the DFlow aggregator on Solana. Uses the swap_orchestrator_evt_swapevent decoded table, joins to Jupiter's AMM list for DEX identification, and enriches with token metadata and USD pricing.
[...]
quick links for more information: