---
title: "What is a computed column?"
description: "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."
url: "https://www.pixeltable.com/learn/what-is-a-computed-column"
updated: "2026-09-29"
vertical: "Orchestration"
doc: "https://docs.pixeltable.com/datastore/computed-columns"
---

# 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: 2026-09-29
Part of [What is a declarative pipeline?](https://www.pixeltable.com/learn/what-is-a-declarative-pipeline).

## On this page

- [How it works](https://www.pixeltable.com/learn/what-is-a-computed-column#how-it-works)
- [What it is not](https://www.pixeltable.com/learn/what-is-a-computed-column#what-it-is-not)
- [Comparison](https://www.pixeltable.com/learn/what-is-a-computed-column#comparison)
- [Where Pixeltable fits](https://www.pixeltable.com/learn/what-is-a-computed-column#where-pixeltable-fits)
- [Questions](https://www.pixeltable.com/learn/what-is-a-computed-column#questions)

## How it works {#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 {#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 {#comparison}

|  | 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 {#where-pixeltable-fits}

In Pixeltable a computed column is an assignment on the class. Insert a row and the expression runs.

```python
import pixeltable as pxt
from pixeltable.functions.openai import chat_completions

TableModel = pxt.model_base()

class Docs(TableModel, name='docs'):
    text: pxt.String

    summary = chat_completions(
        messages=[{'role': 'user', 'content': text}],
        model='gpt-4o-mini',
    ).choices[0].message.content
```

## Questions {#questions}

### How does computed column work? {#faq-1}

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? {#faq-2}

It is not a trigger you maintain by hand, an edge function, or a batch job that rewrites the whole table.

## In the blog

- [Can a Coding Agent Maintain a Multimodal AI Backend? Recorded Runs, From Build to Export](https://www.pixeltable.com/blog/coding-agent-maintains-multimodal-backend)
- [The context architecture for an AI teammate](https://www.pixeltable.com/blog/context-architecture-ai-teammate)
- [How to build an agent state machine in Pixeltable](https://www.pixeltable.com/blog/agent-state-machine-pixeltable)
- [Build your own agent trace lake with Pixeltable](https://www.pixeltable.com/blog/build-agent-trace-lake-pixeltable)
- [Research, code and images on the GPU you already own, as one Pixeltable app](https://www.pixeltable.com/blog/self-hosted-ai-research-code-images-local-gpu-pixeltable)
- [Tracing multimodal AI pipelines with OpenTelemetry: Pixeltable + Langfuse, Phoenix, MLflow, Opik, and SigNoz](https://www.pixeltable.com/blog/tracing-multimodal-ai-pipelines-opentelemetry)

## How-to guides

- [How do I build an AI data pipeline in Python?](https://www.pixeltable.com/learn/how-to/build-an-ai-data-pipeline)
- [How do I add computed columns with LLM calls in Python?](https://www.pixeltable.com/learn/how-to/add-computed-columns-with-llm-calls)
- [How do I replace an Airflow DAG and a vector database with one schema?](https://www.pixeltable.com/learn/how-to/migrate-from-airflow-and-a-vector-database)

## Related

- [Documentation](https://docs.pixeltable.com/datastore/computed-columns)
- [Dependency Graph Magic: How Pixeltable Keeps Your AI Pipeline Data Consistent](https://www.pixeltable.com/blog/dependency-graph-magic-computed-columns)
- [Neon Functions vs Pixeltable Computed Columns](https://www.pixeltable.com/blog/neon-functions-vs-pixeltable-computed-columns)
- [AI Transformations Belong in the Schema, Not Bolted on Top](https://www.pixeltable.com/blog/ai-transformations-in-the-schema)
- [Declarative data infrastructure](https://www.pixeltable.com/use-cases/declarative-ai-data-infrastructure)
- [Supabase alternative: Pixeltable vs Supabase](https://www.pixeltable.com/compare/pixeltable-vs-supabase)
- [What runs under LangChain: Pixeltable vs LangChain](https://www.pixeltable.com/compare/pixeltable-vs-langchain)
