Skip to content

Feat!: print auto-restated trigger of model evaluation in debug console #4980

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

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

Conversation

treysp
Copy link
Contributor

@treysp treysp commented Jul 16, 2025

During a run, models are usually evaluated because their cron has elapsed. However, any model that is auto-restated will cause all its children to be evaluated as well.

Currently, the SQLMesh does not indicate which of those caused the model to be evaluated. This PR adds that information to the debug console.

Example
Consider a project with three models incremental_model --> full_model --> full_model_downstream.

The incremental_model has an auto-restatement, and when it is triggered during a run each of the three models will be annotated with evaluation_triggered_by="db"."sqlmesh_example"."incremental_model":

❯ sqlmesh --debug run          
    

@treysp treysp force-pushed the trey/auto-restate-triggers branch from 828ab26 to 1230edb Compare July 16, 2025 20:52
@erindru
Copy link
Collaborator

erindru commented Jul 16, 2025

Nice, I think this will help a lot with debugging "why do I have a heap of changed models, I didnt change anything"-type questions

@treysp treysp force-pushed the trey/auto-restate-triggers branch from 1230edb to 37f6fa4 Compare July 22, 2025 20:18
@treysp treysp changed the title Feat: print auto-restated trigger of model evaluation in debug console Feat!: print auto-restated trigger of model evaluation in debug console Jul 22, 2025
@treysp treysp force-pushed the trey/auto-restate-triggers branch from c605eeb to a01cb9f Compare July 31, 2025 23:36
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.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy