Skip to content

Commit 4d2e632

Browse files
izeigermantreysp
andauthored
Chore: Update the docs for the allow_partials attribute (#3993)
Co-authored-by: Trey Spiller <1831878+treysp@users.noreply.github.com>
1 parent 9088c7b commit 4d2e632

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docs/concepts/models/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,9 @@ Learn more about these properties and their default values in the [model configu
426426

427427
Setting `allow_partials` to `true` overrides this behavior, indicating that the model may process a segment of input data that is missing some of the data points.
428428

429-
NOTE: setting this attribute to `true` disregards the [cron](#cron) property.
429+
NOTE: To force the model to run every time, set `allow_partials` to `true` and use the `--ignore-cron` argument: `sqlmesh run --ignore-cron`. Simply setting `allow_partials` to `true` does not guarantee that the model will run on every `sqlmesh run` command invocation. The model’s configured `cron` schedule is still respected, even when partial intervals are allowed.
430+
431+
Similarly, using `--ignore-cron` without setting `allow_partials` to `true` does not guarantee the model will run every time. Depending on the time of day, the interval might not be complete and ready for execution, even when ignoring the `cron` schedule. Therefore, both are required to ensure that the model runs on every `sqlmesh run` invocation.
430432

431433
### enabled
432434
: Whether the model is enabled. This attribute is `true` by default. Setting it to `false` causes SQLMesh to ignore this model when loading the project.

docs/faq/faq.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@
153153

154154
You can retroactively apply the forward-only plan's changes to existing data in the production environment with [`plan`'s `--effective-from` option](../reference/cli.md#plan).
155155

156+
??? question "How can I force a model to run now?"
157+
Ensure that the model's `allow_partials` attribute is set to `true` and execute the `run` command with the `--ignore-cron` option: `sqlmesh run --ignore-cron`.
158+
159+
See the documentation for [allow_partials](../concepts/models/overview.md#allow_partials) to understand the rationale behind this.
160+
156161

157162
## Databases/Engines
158163

0 commit comments

Comments
 (0)