Materialization

When you run transformation in a model you can define how the generated results are stored, or materialized, in the target database. Recurve supports the following materialization options.

  • Table

  • View

  • Incremental

  • Ephemeral

Depending on your transformation use cases, you can select different materialization strategies. You can view and configure materialization of a model in the Metadata section.

By default, all models are materialized as tables.

Table

Definition: Creates a table and stores the results when building the model. Every time the model is run, the table is dropped and recreated with the latest data.

Use case: Use when you want to physically store the data and prefer faster query performance at the cost of extra space.

View

Definition: Creates a view in the database. A view is simply a stored query and does not hold data; instead, it provides a virtual table environment for various complex operations.

Use case: Use views when you want to avoid storing a physical table and don’t mind the performance cost of re-running the query every time the view is accessed.

Incremental

Definition: Adds new or updated records to an existing table without recreating the entire table.

Use case: Ideal for very large datasets where it would be inefficient to rebuild the entire table each time. Only processes new or modified data since the last run.

Ephemeral

Definition: The model is not materialized at all. Instead, the model snippet is interpolated into the downstream models that reference it. This is similar to treating the model snippet as a common table expression (CTE).

Use case: Useful for intermediate computations that don't need to be stored but are referenced in downstream models.

Last updated