When you add a computed column, Pixeltable executes it immediately for all existing rows. For expensive operations (LLM calls, model inference), validate your logic on a sample first using select(); nothing is stored until you commit with add_computed_column().
Copy
Ask AI
# 1. Test transformation on sample rows (nothing stored)table.select( table.text, summary=summarize_with_llm(table.text)).head(3) # Only processes 3 rows# 2. Once satisfied, persist to table (processes all rows)table.add_computed_column(summary=summarize_with_llm(table.text))
This “iterate-then-add” workflow lets you catch errors early without wasting API calls or compute on your full dataset.
Pro tip: Save expressions as variables to guarantee identical logic in both steps:
Modify computed columns (if_exists='replace'), Drop columns/tables/views
Full recomputation or data loss
Production Safety:
Copy
Ask AI
# Use if_exists='ignore' for idempotent schema migrationsimport pixeltable as pxtimport configdocs_table = pxt.get_table(f'{config.APP_NAMESPACE}/documents')docs_table.add_computed_column( embedding=embed_model(docs_table.document), if_exists='ignore' # No-op if column exists)
Version control setup_pixeltable.py like database migration scripts.
Rollback via table.revert() (single operation) or Git revert (complex changes).
One active pod writes to dedicated volume. Failover requires volume detach/reattach.
Multiple Pods + Shared Volume (NFS/EFS)
❌ Not Supported
Will cause database corruption. Do not mount same pgdata to multiple pods.
Multi-Node HA
🔜 Coming 2026
Available in Pixeltable Cloud (serverless scaling, API endpoints). Join waitlist
Single-Writer Limitation: Pixeltable’s storage layer uses an embedded PostgreSQL instance. Only one process can write to ~/.pixeltable/pgdata at a time.
Test schema changes, UDF updates, application code changes.
Use representative data (anonymized or synthetic).
Copy
Ask AI
# Test environment with isolated namespaceimport pixeltable as pxtTEST_NS = 'test_myapp'pxt.create_dir(TEST_NS, if_exists='replace')# Run setup targeting test namespace# Execute tests# pxt.drop_dir(TEST_NS, force=True) # Cleanup