Skip to content
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

Uniswap block month partitioning #4119

Merged
merged 6 commits into from
Aug 18, 2023
Merged

Conversation

aalan3
Copy link
Contributor

@aalan3 aalan3 commented Aug 18, 2023

This PR is a requirement for #4107.

I've done the following for the models

  • Partition by block_month
  • Added CAST(date_trunc('month', dexs.block_time) AS date) AS block_month to each model
  • Added block_month to the yaml files
  • Changed so that the models variables are defined using ref (this makes it possible to cmd + click in VSCode)
  • There are a bunch of whitespace changes which is my editor removing it automatically

@aalan3 aalan3 requested a review from jeff-dude August 18, 2023 14:40
Copy link
Member

@jeff-dude jeff-dude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me!

side note: we left try_cast alone for now, but post-migration planned on universal change to cast, but obviously fine to do here now

@aalan3
Copy link
Contributor Author

aalan3 commented Aug 18, 2023

I think we can drop cast all together but yeah for another time

@aalan3 aalan3 merged commit f6f6fde into main Aug 18, 2023
@aalan3 aalan3 deleted the uniswap-block-month-partitioning branch August 18, 2023 15:12
@github-actions github-actions bot locked and limited conversation to collaborators Aug 18, 2023
@jeff-dude
Copy link
Member

I think we can drop cast all together but yeah for another time

i don't think so, based on our testing. date_trunc on trino doesn't auto-cast, it takes from the field you pass in (which is timestamp almost every time), so it'd output timestamp

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants