add columns to polymarket models#9107
Conversation
PR SummaryIntroduces new analytics surfaces and enriches existing Polymarket models for better querying and pricing.
Written by Cursor Bugbot for commit d775b77. Configure here. |
|
PR is ready btw, it has a a few new spells and some new columns in a few tables I also optimised the spells a bunch since runtime was crazy on some of those. It's far from perfect but should require a lot less compute than they used to. I made sure to keep all old columns for backward compatibility. The only missing thing is for the market details spell which needs to have uploaded base table switched from dune's (deprecated afaik) to polymarket's uploaded one but it's missing a needed column so I pinged Primo to ask if he could add it. We can merge as is and tackle that in another follow up PR |
|
@jeff-dude could you review this PR please? |
before diving deep, want to give you heads up that we have three open PRs to materialize polymarket views into incremental tables. once those are deployed and rebuilt, you can merge changes into your branch here. then we can look into the additional columns and tables. our changes will not change the data output or schema at all, simply materialize into tables for performance downstream. |
do as you need, I switched out of dune to using another more reliable source for polymarket data since most things blow past dune's query runtime anyways because the spells are in a rough state and merging this took way too long |
understood. this is why we materialized, to help with query performance. we are also spending time Q2 on enhancing prediction market datasets. |
|
@jeff-dude yes but materialising them won't fix this fyi. you can't even get volume from them right now and need to defer to decoded even tables, same for tvl (costs insane compute because dates are string for example) and many other super basic metrics. the queries are very suboptimal in their current state, hence my PR here. In this PR I tried to keep all currently active columns while adding new ones that I think are more useful (so it will remain with a ton of technical debt of unneeded stuff either way) |
okay thanks for clarifying. i have shared internally with the team for reference. |
Made-with: Cursor
Build user balance changes from capital actions instead of rescanning raw transfers so the initial full build uses a smaller input set and avoids Trino memory blowups. Made-with: Cursor
|
bugbot run |
Bugbot couldn't runBugbot is not enabled for your user on this team. Ask your team administrator to increase your team's hard limit for Bugbot seats or add you to the allowlist in the Cursor dashboard. |
Made-with: Cursor
Declare the positions model dependency on market state recompute tokens so downstream rebuilds pick up market state changes reliably. Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
added columns to existing tables (needed for much more efficient queries) and created 3 tables: