Skip to content

Clarify preview backfills in explained plan #5116

@treysp

Description

@treysp

TL;DR: clarify when models are only being backfilled because of the need for dev previews

SQLMesh provides an explanation of the actions a plan will take if the --explain flag is passed to the CLI command.

For plans against non-prod environment, the explanation notes when a backfill is a dev preview that will not be reused in prod. Example:

│   └── project__dev.the_table -> "db"."sqlmesh__theschema"."the_table__11617724__dev"
│       ├── Fully refresh table
│       │   └── preview: data will NOT be reused in production  <------------------- PREVIEW NOTE
│       └── Run 'not_null' audit

If a plan includes indirect non-breaking changes, the user expects those models NOT to be backfilled. However, the backfill section header is:

Models needing backfill:

This is confusing because those models should not "need" to be backfilled - they are only being backfilled because of the need to preview.

We should provide additional explanation to clarify this, possibly creating a separate section for Models needing previews.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementImproves existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions