Skip to content

Commit cd4f7e8

Browse files
authored
docs: Clarify on_zero_results is ignored in caching refresh mode (#1686)
1 parent c9492d1 commit cd4f7e8

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

website/docs/features/data-acceleration/data-refresh.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ If a query against the accelerated data returns some results, the query will not
342342
| Required | No |
343343
| Default Value | `return_empty` |
344344

345+
:::warning
346+
`on_zero_results` is ignored when `refresh_mode: caching` is set. Caching mode always queries the source on a cache miss, regardless of this setting. Remove `on_zero_results` from caching-mode dataset configurations to silence the runtime warning.
347+
:::
348+
345349
By default, accelerated datasets only return locally materialized data. If this local data is a subset of the full dataset in the federated source—due to settings like `refresh_sql`, `refresh_data_window`, or retention policies—queries against the accelerated dataset may return zero results, even when the federated table would return results.
346350

347351
To address this, `on_zero_results: use_source` can be configured in the acceleration configuration. Queries returning zero results will fall back to the federated source, returning results from querying the underlying data.

website/docs/features/data-acceleration/refresh-modes/caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ The `caching` mode supports standard refresh configuration options. See [Stale-W
541541
| `refresh_check_interval` | How often to refresh cached data in the background | None |
542542
| `refresh_sql` | SQL query defining what data to cache | None |
543543
| `refresh_on_startup` | Whether to refresh on startup (`auto` or `always`) | `auto` |
544-
| `on_zero_results` | Behavior when cache returns no results (`return_empty`, `use_source`) | `return_empty` |
544+
| `on_zero_results` | **Ignored in caching mode.** Caching mode always queries the source on a cache miss, regardless of this setting. | `return_empty` |
545545
| `engine` | Acceleration engine (`arrow`, `duckdb`, `sqlite`, `cayenne`) | `arrow` |
546546
| `mode` | Persistence mode (`memory` or `file`) | `memory` |
547547

0 commit comments

Comments
 (0)