Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/concepts/plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,30 @@ Because the prod environment supports business operations, prod plans ensure eve

Non-prod plans are typically used for development, so their models can optionally be backfilled for any date range with the `--start` and `--end` options. Limiting the date range makes backfills faster and development more efficient, especially for incremental models using large tables.

#### Preview a development plan without backfilling

If you want to apply a development plan without evaluating model intervals,
choose whether SQLMesh should record the missing intervals as complete:

| Option | Executes a backfill? | Records missing intervals as complete? | When to use it |
| --- | --- | --- | --- |
| `--skip-backfill` | No | No | Inspect the development environment without marking data as loaded. |
| `--empty-backfill` | No | Yes | Test a workflow that needs the intervals to be recorded even though no data was loaded. |

For example, suppose a new daily incremental model reads one source row dated
January 1. Run one of these plans against a fresh development environment:

```bash
sqlmesh plan dev --start 2025-01-01 --end 2025-01-01 --skip-backfill
sqlmesh plan dev --start 2025-01-01 --end 2025-01-01 --empty-backfill
```

After applying either plan, the new model's development view returns no rows.
With `--skip-backfill`, January 1 is still missing. With `--empty-backfill`,
SQLMesh tracks January 1 as complete despite the empty result. Use a normal
backfill for a preview that needs actual data, and don't use
`--empty-backfill` for intervals you expect SQLMesh to fill automatically.

#### Model kind limitations

Some model kinds do not support backfilling a limited date range.
Expand Down