Skip to content

UDFs in Pixeltable

Pixeltable comes with a library of built-in functions and integrations, but sooner or later, you'll want to introduce some customized logic into your workflow.

Tutorials · Notebook · Updated

Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.

What it covers

  • What is a UDF?
  • Types in UDFs
  • Local and module UDFs
  • Batching
  • UDAs (aggregate UDFs)

What it uses

Install
terminal
pip install pixeltable
Pixeltable calls
pxt.create_table()@pxt.udfpxt.udf()@pxt.udainsert()add_computed_column()group_by()

A look at the code

udfs-in-pixeltable.ipynb
t.add_computed_column(
longest_word_2=longest_word(t.input, strip_punctuation=True)
)
t.show()

One cell of the notebook, copied as it is. Open it in Colab for the rest.

Browse all 103
  • Embedding Indices

    Create an embedding index, query it with similarity search and keep it current as data changes. Covers several indexes on one column, custom embedding UDFs and precomputed embeddings.

    Updated Open in Colab
  • External Files

    In Pixeltable, all media data (videos, images, audio) resides in external files, and Pixeltable stores references to those.

    Updated Open in Colab
  • 10-Minute Tour

    Welcome to Pixeltable! In this tutorial, we'll survey how to create tables, populate them with data, and enhance them with built-in and user-defined transformations and AI operations.

    Updated Open in Colab