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

sqlmesh: small fixes to business logic and date handling #3019

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ccerv1
Copy link
Member

@ccerv1 ccerv1 commented Feb 11, 2025

  • fix(sqlmesh): update onchain models to latest business logic
  • fix(sqlmesh): include AA event types
  • fix(sqlmesh): update project graphs to latest models
  • fix(sqlmesh): final review and trino compatibility checks

Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kariba-network ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 11, 2025 1:25am
oso-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 11, 2025 1:25am

Copy link

@oso-prs oso-prs bot left a comment

Choose a reason for hiding this comment

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

Auto-approved! please merge responsibly 😄

Copy link
Member

@ryscheng ryscheng left a comment

Choose a reason for hiding this comment

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

I think we discussed this at length yesterday, but a summary of what I remember:

  • Let's version definitions with explicit dates so that we know what we funded
  • I'll work on adding the events we discussed into the event table, so that we can write these models on top of the event table
  • We will need to add user AA events into the event table as well, will need your help when we get to that point
  • Worth doing a simple token transfer event into the event table as an example
  • Eventually, we will need to track funding amounts to a metric_id / metric definition, which is why we probably want to have immutable definitions at the time of funding
  • Otherwise looks fine, I'd keep running

@@ -15,7 +14,7 @@ with developers as (
on events.from_artifact_id = users.user_id
where
events.event_type = 'COMMIT_CODE'
and not regexp_matches( -- TODO: confirm this will work in Trino too
Copy link
Member

Choose a reason for hiding this comment

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

I don't think so...
https://trino.io/docs/current/functions/regexp.html

Can you

  • Replace with valid regexp fn
  • Make Trino dialect explicit in model definition
  • Test with local Trino?

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

Successfully merging this pull request may close these issues.

Refactor S7 metrics models
2 participants