What it does
- Displays rows and columns from query results
- Supports scrolling for large datasets
- Resizable both horizontally and vertically
- Always uses code mode for data transformation
Configuration
The Table is configured entirely through its transform code. There’s no basic mode—you write atransform function that returns the data to display.
Transform function
Your transform function must return an object withheaders and rows:
Return type
Available functions
Inside your transform, you can use:| Function | Returns | Description |
|---|---|---|
query(slug) | { columns, rows, count, executedAt } | Get data from a query by its slug |
input(slug) | { value, displayName } | Get value from an input component |
Examples
Basic query display
Custom column headers
Filter based on input
Computed columns
Format dates and numbers
State
The Table component reads from state but doesn’t write to it. It can access:- Query results — via
query(slug) - Input values — via
input(slug)
Tips
- Keep transforms fast — Transforms run whenever data changes, so avoid expensive operations
- Handle missing data — Check for null/undefined before accessing nested properties
- Use descriptive headers — Your users will see these in the table header
- Filter in SQL when possible — For large datasets, filter at the database level for better performance