From 51cf7781e4d04abff1e790a8834d0daf9b1ef87e Mon Sep 17 00:00:00 2001 From: Himanshu Agrawal Date: Sun, 6 Dec 2026 13:47:11 +0530 Subject: [PATCH] docs: compare skip and empty backfill in development Signed-off-by: Himanshu Agrawal --- docs/concepts/plans.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/concepts/plans.md b/docs/concepts/plans.md index c3e12652ee..feab26ca89 100644 --- a/docs/concepts/plans.md +++ b/docs/concepts/plans.md @@ -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.