Skip to content

Conversation

VaggelisD
Copy link
Contributor

This PR enables SQLMesh to skip re-evaluating models that depend on external model(s) which have not been updated since the last run.

This is done by:

  1. Adding the last_altered_ts field in the _intervals table which tracks the last modification to the physical table of that snapshot
  2. Querying the INFORMATION_SCHEMA for the external model's "last altered" timestamp wherever applicable (BQ & Snowflake for the time being)

@@ -690,6 +694,12 @@ def hydrate_with_intervals_by_version(
)
for interval in snapshot_intervals:
snapshot.merge_intervals(interval)

if interval.last_altered_ts:
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 this is correct. I don't see us distinguishing between dev and non-dev intervals. For example, adding an interval for a dev table should not have impact on last_altered_ts used for the non-dev / prod table.

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.

2 participants