-
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
Add PancakeSwapX on Ethereum to Dex Trades #7383
base: main
Are you sure you want to change the base?
Conversation
This reverts commit e4f46af.
Hi @Hosuke @jeff-dude Got this error when running dbt-test: Edit: Nvm turns out there were some duplicated combinations of tx_hash_ + evt_index. Fixed now thanks. |
select * from {{ source('tokens', 'transfers') }} | ||
where blockchain = 'ethereum' | ||
and block_date >= date '2024-09-20' | ||
and tx_hash in (select evt_tx_hash from {{ source('pancakeswap_ethereum', 'ExclusiveDutchOrderReactor_evt_Fill') }}) |
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.
Do you think we can make this part a CTE with incremental filters before left join?
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.
Do you mean like this?
with transfer as (
select * from {{ source('tokens', 'transfers') }}
where blockchain = 'ethereum'
and block_date >= date '2024-09-20'
and tx_hash in (select evt_tx_hash from {{ source('pancakeswap_ethereum', 'ExclusiveDutchOrderReactor_evt_Fill') }})
{% if is_incremental() %}
WHERE {{ incremental_predicate('a.evt_block_time') }}
{% endif %}
)
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.
Exactly.
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: