Skip to main content
A materialized model stores a model’s results as a table in your Basedash-managed warehouse. Charts and the AI read the table instead of re-running the model’s SQL, and Basedash rebuilds it when new data syncs.
Materialized models are in beta and may not be enabled for your organization yet. Contact support@basedash.com to request access.

Overview

Materialize a model when its SQL is expensive, for example a model that joins several large synced tables or computes daily rollups. Queries that use the model then read a ready-made table, so charts load faster. Materialization requires the model to be on a Basedash-managed warehouse: Basedash Warehouse on Postgres or MotherDuck. The table is stored in the basedash_materialized schema of that warehouse. You keep querying the model the same way, as models.<reference_name>. Basedash points those queries at the materialized table.

Materialize a model

  1. Open the model from Models in the sidebar.
  2. Turn on Enable materialized table.
  3. Basedash builds the table. While it builds, the model shows Building table…. When it’s done, it shows the row count and when it was built.
You need edit access to the model’s data source.

When the table rebuilds

Basedash rebuilds a materialized table:
  • When a connector sync finishes for any schema the model reads from.
  • When you click Rebuild.
There’s no separate schedule; the table stays as fresh as the data it’s built from. Each rebuild writes to a new table and swaps it in when it’s done, so charts keep reading the previous table while a rebuild runs. If a build fails, the model shows Last build failed. Charts use the previous table.

Requirements and limits

  • The model must be on a Basedash-managed Postgres or MotherDuck warehouse. - The model’s SQL must be read-only. - The model’s reference name can contain only lowercase letters, numbers, and underscores, up to 52 characters. - Models on data sources with row-level security can’t be materialized.
To stop using the table, turn off Enable materialized table. Queries go back to running the model’s SQL.

FAQ

Not yet. Materialization only works on Basedash-managed warehouses.
No. Charts that query models.<reference_name> use the materialized table automatically.
It rebuilds when a connector sync finishes for the schemas the model reads. If the connector is paused or syncs infrequently, click Rebuild, or change the connector’s sync frequency.