-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optimism: uniswap pools dex balances #7271
Conversation
...bprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql
Outdated
Show resolved
Hide resolved
...bprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql
Outdated
Show resolved
Hide resolved
...bprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql
Outdated
Show resolved
Hide resolved
...bprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql
Outdated
Show resolved
Hide resolved
...bprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql
Outdated
Show resolved
Hide resolved
...bprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql
Outdated
Show resolved
Hide resolved
...bprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/op_token_balances.sql
Outdated
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml
Outdated
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml
Outdated
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/models/_sector/stablecoins/Opitimism/Uniswap/schema.yml
Outdated
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml
Outdated
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml
Outdated
Show resolved
Hide resolved
dbt_subprojects/daily_spellbook/models/_sector/dex/pools/optimism/uniswap/_sources.yml
Outdated
Show resolved
Hide resolved
please merge in main to resolve the compile issue. |
FROM | ||
op_pools p | ||
LEFT JOIN | ||
filtered_balances b ON p.pool_address = b.pool_address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM | |
op_pools p | |
LEFT JOIN | |
filtered_balances b ON p.pool_address = b.pool_address | |
FROM | |
filtered_balances b | |
RIGHT JOIN | |
op_pools p ON p.pool_address = b.pool_address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for the patience and iterating on changes to improve the spell. one last request, can we try flipping the read table and right join pools, since balances is larger table? just curious to see impact on run time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion! I've updated the query to use a RIGHT JOIN with filtered_balances as the read table and op_pools on the right. I'll test the runtime and see if it improves performance.
coming back with another suggestion. you can try in a fresh PR, if you'd like, to keep things clean. i notice you're building out various DEXs to fit this similar design pattern. can we try an approach to read from
then pass that output into our generic balances macro, like this PR? i think in the long run, this could save you time across various DEXs. the question will be how that performs, as you could be pulling many more pools than you do here. |
closing in favor of new PR |
Thank you for contributing to Spellbook 🪄
Please open the PR in draft and mark as ready when you want to request a review.
Description:
[...]
quick links for more information: