Enterprise only
A Function refresh can encounter a bad row, fail to initialize a model, lose
a worker, or fail while publishing results. These need different remedies.
The native workflow below needs a recent SDK and a matching Enterprise server.
The recipes that follow it remain available for older deployments.
Native workflow: server contract version 1
This section requires Python SDK 0.42.0b19 or later and an Enterprise deployment advertisingworkflow_version >= 1 in its Function error response.
The SDK checks this capability before submitting native retry, upgrade,
quarantine, history or provenance requests, and rejects unsupported servers
before changing the column.
New Function refreshes default to error_policy="skip" with a 5% failed-row
ceiling. Successful outputs are published before a threshold failure is
reported; failed rows and grouped causes remain available. Explicit fail
still stops on a row error. Initialization, infrastructure and publication
failures remain job failures. External effects can repeat during recovery.
Read current unresolved failures, group their causes and inspect their inputs:
summary() and rows() refuse
incomplete selections; narrow a truncated request before inspecting it.
Historical records cannot be joined to current inputs through rows().
Stable row IDs survive compaction; older physical-only records are rejected
for exact retry if their fragments have been rewritten.
Select retry rows on the server, optionally by exception class or job:
recompute="failed" selects current failures; "all" recomputes all live rows;
"none" changes the binding while preserving existing values. The default is
"all". New and changed inputs use the new version. Producing-version records
identify successful values written by this workflow; older values without
recorded provenance do not acquire an invented producing version.
Quarantine failures that need input repair, then explicitly include them when
they are ready to retry:
"all" upgrade. Explicit inclusion releases quarantine before the retry.
Async tables expose the same operations with await; function_errors()
returns AsyncFunctionErrors, and its rows() method is also awaited.
These native recovery APIs are available in Python and Rust. TypeScript does
not yet expose them; its SDK support is tracked as a separate follow-up.
The equivalent Rust operations use explicit request options:
include_quarantined(true) on a Rust failed-row retry to explicitly
release quarantine before recomputing those failures.
The native contract also applies skip/5% defaults to newly created materialized
views, with errors identified by Function invocation and source input. Column
retry and upgrade helpers apply to Function columns; use the materialized-view
refresh reference for view refresh options.
Resume a failed refresh job
Job recovery requires a Python or Rust SDK that exposesresume_refresh and
an Enterprise deployment that supports POST /v1/table/{id}/resume_refresh.
The workflow_version reported by function_errors covers row-error
operations. Check your server release for job recovery support separately.
Open the original table on the branch where the refresh failed. Pass the
failed job ID to get a handle for the successor attempt and wait for its result.
max_job_attempts=1 when submitting
the refresh until you have verified replay safety on your deployment. A limit
of 1 counts the initial attempt and disables automatic job retries.
Older-deployment recipes
The following sections describe deployments without workflow version 1. Their legacy defaults, error-history semantics and application-managed quarantine remain unchanged.Choose a row-error policy
On these deployments, the defaultfail stops the job on a row error. skip
retains a failed row’s existing output, leaves an unassigned output unassigned
and records errors, subject to the refresh’s failure limits:
skip does not make initialization,
infrastructure or publication failures successful. If wait() raises,
refresh the job record, inspect job.failure(), and
inspect any recorded row errors. A failed/cancelled job can have committed
some output, but retention of every successful call is not guaranteed.
External effects are not rolled back and can be repeated during recovery.
Inspect and group recorded errors
Scope diagnostics to the job you are investigating:attempts and traceback
details depend on the server/image version. This client-side grouping counts
only returned detail records. truncated=True or fragment summaries with
more skipped than recorded rows mean it is incomplete; do not label it a full
error census. See SHOW ERRORS for SQL and its limits.
Records are historical observations, not a deduplicated list of currently
failed rows. Reading errors without job_id can include older attempts that
have since succeeded. A null output can mean unfilled, skipped, or a computed
nullable field; output nullness alone is not a current-error test.
Retry exactly identified rows
On tables with stable row IDs, supporting server/SDK versions returnrecord.row_id from the refresh’s pinned source version. Keep that table and
branch identity with the records. Compaction can move physical addresses, so
do not derive a row ID from fragment numbers or offsets.
The following deliberately refuses incomplete or unidentified error sets.
Review historical records against the current inputs before using them as a
retry selection. Keep this selection small enough for a SQL predicate.
_rowaddr after a rewrite.
Python where= requires a supporting SDK such as 0.42.0b9, not stable
0.41.0, plus a matching server.
Repair with a newer Function
Registering a new version does not change an existing column’s immutable binding. To evaluate a fix while retaining old outputs, register the corrected callable and declare a separate output column. For example, with a correctedembed_fixed callable already defined and a text input column:
Quarantine inputs for review
Use an application-owned table of source table/branch, recorded table version, stable row ID or business key, Function version, cause and review disposition. Keep Blob payloads in the source table; a quarantine entry can refer to their source identity. Choose an ordinary table name such asfunction_quarantine,
and explicitly exclude its reviewed IDs in subsequent input selections.
Quarantine is an application workflow here: there is no implied built-in
quarantine lifecycle, automatic current-error clearing or exactly-once retry.
Do not delete source rows merely to hide an error. For very large failure sets,
bounded error listings cannot select every row; use a smaller reviewed scope
or wait for a deployment with the required complete selection support.
Native retry policies, full current-error summaries, in-place version upgrades
and materialized-view row-error handling have separate server/SDK prerequisites.
Do not apply REFRESH COLUMN options to a materialized view and assume the
same policy; consult the MV refresh reference
for your deployment’s accepted options.