Skip to main content
A schema defines the columns that Lasso extracts from your source data. Think of it as a blueprint for your table.

Column definitions

Each column has a key, label, and type:
{
  "key": "product_name",
  "label": "Product Name",
  "type": "text",
  "required": true
}
  • key — Machine-readable identifier (snake_case). Used to access data in rows.
  • label — Human-readable name shown in exports and the dashboard.
  • type — The data type Lasso should extract. See below.
  • required — Whether this column must have a value for every row.

Column types

TypeDescriptionExample value
textPlain text"iPhone 15 Pro"
numberInteger or decimal999.99
urlValid URL"https://example.com"
emailEmail address"info@example.com"
dateDate or datetime"2025-03-10"
booleanTrue or falsetrue
richtextHTML or markdown"<p>Description</p>"
enumOne of predefined values"electronics"
tagsArray of strings["wireless", "bluetooth"]
imageSingle image URL"https://cdn.example.com/img.jpg"
imagesArray of image URLs["https://...1.jpg", "https://...2.jpg"]
jsonArbitrary JSON{"specs": {"weight": "187g"}}

Auto-generated schemas

If you are not sure what columns to define, you can let the AI generate a schema from sample data:
const schema = await client.schemas.generate({
  sample_data: "Product: iPhone 15 Pro, Price: $999, Color: Titanium",
  name: "Smartphones",
});

console.log(schema.columns);
The AI analyzes your sample and infers appropriate column keys, labels, and types.

Reusing schemas

Schemas are reusable across multiple tables. Create a schema once, then reference it by ID when creating new tables. You can update a schema at any time — existing tables retain their original column definitions.