> For the complete documentation index, see [llms.txt](https://docs.dinmo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dinmo.io/models/overview/model-materialization.md). Agents can also search and read this documentation through its [MCP server](https://docs.dinmo.io/~gitbook/mcp).

# Model materialization

When creating a model in DinMo, you can choose whether to **materialize** it in your data warehouse or keep it **non-materialized** (live).\
This setting impacts data freshness, performance, and query costs.

{% hint style="info" %}
Here is an overview of the difference between a materialized model and a live model, to help you choose based on your use cases.
{% endhint %}

## Model modes

### Materialized Models

A **materialized model** stores query results as a physical table in your data warehouse (e.g., BigQuery, Snowflake).\
The table is **refreshed on a defined schedule**.

**How it works:**

* DinMo executes the model’s SQL and writes the results to a dedicated table.
* Subsequent operations (segment creation, activation, predictions) read directly from this table.

**Pros**

* Faster queries and improved performance.
* Reduced query costs (reused results).
* Stable data snapshot for consistent analysis.

**Cons**

* Data freshness depends on the refresh schedule.

### Live Models

A **live (=non-materialized model)** remains a logical view — it is **queried in real time** each time it’s used.

**How it works:**

* DinMo runs the SQL query on-demand whenever the model is referenced.
* Results always reflect the **most up-to-date data** in your warehouse.

**Pros**

* Always fresh data.
* No need to manage refreshes.

**Cons**

* Slower query execution (SQL runs at each use).
* Higher warehouse costs for frequent access.

## Model configuration

By default, a model is always live. If you want to materialize it for cost or performance reasons, you can do so in the model's advanced settings.

### At the model's creation

When choosing the table or entering the SQL query that determines the model definition, there is an “Advanced settings” option.

Click on this option and check the box to materialize the model as a table.

<figure><img src="https://3204318043-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxzBTp1t4OfqV67nXkVse%2Fuploads%2Fgit-blob-a9dcd083d1a4a25fbe1ff356400911ebd929d6e6%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

You can then choose the refresh frequency for your model (based on intervals or a custom recurrence)

### At the model's edition

It is possible to switch from a live model to a materialized model by going to the setup page for the model in question and clicking on “Edit.”

The flow then remains the same as [when creating a model](#at-the-models-creation).

## Materialization History

The "Materialization history" tab allows you to view the history, with the status of each run, the objects affected (entire model and/or computed fields), and the time of the update.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.dinmo.io/models/overview/model-materialization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
