Tables
Learn the fundamentals of Pixeltable tables, types, and how to build in Pixeltable
Learn more about Pixeltable tables and the data operations with our in-depth guide.
What are Tables?
Tables are the fundamental data storage units in Pixeltable. They function similarly to SQL database tables but with enhanced capabilities designed specifically for AI and ML workflows. Each table consists of columns with defined data types and can store both structured data and unstructured media assets.
In Pixeltable, tables:
- Persist across sessions, meaning your data remains available even after restarting your environment
- Maintain strong typing for data consistency
- Support operations like filtering, querying, and transformation
- Can handle specialized data types for machine learning and media processing
- Group logically into directories (namespaces) for organization
Creating a table requires defining a name and schema that describes its structure:
Type System
Data Operations
Query Operations
Filter and retrieve data:
String Operations
Manipulate text data:
Insert Operations
Add new data:
Update Operations
Modify existing data:
Delete Operations
Remove data with conditions:
Column Operations
Manage table structure:
Versioning
Manage table versions:
Export Operations
Extract data for analysis:
Always use a where()
clause with delete()
. Without it, all rows in the table will be deleted! While you can use revert()
to undo operations, itβs better to be careful with destructive operations.
Best Practices
Schema Definition
- Use clear naming for directories and tables
- Document computed column dependencies
Application Code
- Use
get_table()
to fetch existing tables - Use batch operations for multiple rows
Common Patterns
Additional Resources
Remember that Pixeltable automatically handles versioning and lineage tracking. Every operation is recorded and can be reverted if needed.
Was this page helpful?