Orchestration
What is a computed column?
A computed column is a value produced by an expression or a model when a row is inserted or a dependency is updated, then stored.
Updated · Part of What is a declarative pipeline?
How it works
- The expression reads other columns.
- Inserting or editing a dependency recomputes the dependents of that row.
- Unchanged rows keep their stored values.
What it is not
It is not a trigger you maintain by hand, an edge function, or a batch job that rewrites the whole table.
computed column: this, and the thing it is confused with
| This | Not this | |
|---|---|---|
| Written by | The engine, from an expression | Your application, every time |
| Cache | Per row | A full-table refresh |
| Failure | The insert aborts; with on_error='ignore', that row keeps the error | A job that retries the world |
Where Pixeltable fits
In Pixeltable a computed column is an assignment on the class. Insert a row and the expression runs.
import pixeltable as pxtfrom pixeltable.functions.openai import chat_completionsTableModel = pxt.model_base()class Docs(TableModel, name='docs'):text: pxt.Stringsummary = chat_completions(messages=[{'role': 'user', 'content': text}],model='gpt-4o-mini',).choices[0].message.content
Questions
How does computed column work?
The expression reads other columns. Inserting or editing a dependency recomputes the dependents of that row. Unchanged rows keep their stored values.
What is computed column often confused with?
It is not a trigger you maintain by hand, an edge function, or a batch job that rewrites the whole table.
Next step
Install the Pixeltable skill, or sign up for Cloud and run the same file on a hosted database.