Skip to main content

class  pixeltable.types.ColumnSpec

Column specification, a dictionary representation of a column’s schema. Exactly one of type or value must be included in the dictionary.

attr  comment

comment: str
Optional comment for the column. Displayed in .describe() output.

attr  custom_metadata

custom_metadata: Any
User-defined metadata to associate with the column.

attr  destination

destination: str | Path
Destination for storing computed output files. Only applicable for computed columns. Can be:
  • A local pathname (such as path/to/outputs/), or
  • The URI of an object store (such as s3://my-bucket/outputs/).

attr  media_validation

media_validation: Literal['on_read', 'on_write']
When to validate media; 'on_read' or 'on_write'.

attr  primary_key

primary_key: bool
Whether this column is part of the primary key. Defaults to False.

attr  stored

stored: bool
Whether to store the column data. Defaults to True.

attr  type

type: type
The column type (e.g., pxt.Image, str). Required unless value is specified.

attr  value

value: exprs.Expr
A Pixeltable expression for computed columns. Mutually exclusive with type.
Last modified on February 24, 2026