-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Introduce dex_aggregator_base_trades #6653
Introduce dex_aggregator_base_trades #6653
Conversation
dbt_subprojects/dex/models/aggregator_trades/dex_aggregator_trades.sql
Outdated
Show resolved
Hide resolved
I will try to refactor |
…/spellbook into dex-aggregator-refactor-dev
dex_aggregator.trades check |
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.
left initial feedback below
dbt_subprojects/dex/models/aggregator_trades/dex_aggregator_base_trades.sql
Outdated
Show resolved
Hide resolved
dbt_subprojects/dex/models/aggregator_trades/dex_aggregator_trades.sql
Outdated
Show resolved
Hide resolved
dbt_subprojects/dex/models/aggregator_trades/dex_aggregator_trades.sql
Outdated
Show resolved
Hide resolved
dbt_subprojects/dex/models/aggregator_trades/dex_aggregator_trades.sql
Outdated
Show resolved
Hide resolved
left join {{ source('tokens', 'erc20') }} erc20b | ||
on erc20b.contract_address = dexs.token_sold_address | ||
and erc20b.blockchain = 'optimism' |
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.
left join {{ source('tokens', 'erc20') }} erc20b | |
on erc20b.contract_address = dexs.token_sold_address | |
and erc20b.blockchain = 'optimism' | |
left join {{ source('tokens', 'erc20') }} erc20b | |
on erc20b.contract_address = dexs.token_sold_address | |
and erc20b.blockchain = 'optimism' |
while we're here, should we remove erc20 metadata too, and apply at the end with prices? similar to dex?
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.
I drafted a similar enrichment macro in this PR.
Co-authored-by: jeff-dude <[email protected]>
, token_bought_symbol | ||
, token_sold_symbol | ||
, token_pair | ||
, token_bought_amount | ||
, token_sold_amount |
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.
I will try to remove these 5 columns from base_trades in order to remove erc20
source table from base_trades spells.
, block_month | ||
, block_date | ||
, block_time | ||
-- , block_number |
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.
block_number
may be supported in future.
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.
this is looking good, i think we're on the right track here 🙏
Background: #6215