Skip to content

Commit 7376ec2

Browse files
nnqtruongStuffbyYuki
authored andcommitted
docs: note that an explicit --execution-time extends a prod plan past the frontier
Documents the behavior from #5640 in the plan 'Start and end dates' section: passing --execution-time later than the intervals already loaded in prod extends the plan end and backfills the missing intervals. Signed-off-by: wtruongdata <quang072000@gmail.com>
1 parent a6b9c63 commit 7376ec2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

docs/concepts/plans.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ For context, every model has a start date. The start can be specified in [the mo
109109

110110
Because the prod environment supports business operations, prod plans ensure every model is backfilled from its start date until the most recent completed time interval. Due to that restriction, the `plan` command's `--start` and `--end` options are not supported for regular plans against prod. The options are supported for [restatement plans](#restatement-plans) against prod to allow re-processing a subset of existing data.
111111

112+
!!! note "Explicit execution time"
113+
114+
"The most recent completed time interval" is measured relative to the plan's *execution time*, which defaults to now. If you pass an explicit `--execution-time` that is later than the intervals already loaded in prod, the plan extends its end date up to that time and backfills the intervals in between.
115+
116+
For example, if a daily model in prod is loaded through 2025-12-25, running `sqlmesh plan --execution-time '2025-12-28'` backfills the missing 2025-12-26 and 2025-12-27 intervals.
117+
112118
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.
113119

114120
#### Model kind limitations

0 commit comments

Comments
 (0)