For the complete documentation index, see llms.txt. This page is also available as Markdown.

Computed Fields

Enrich DinMo models with calculated, classified, aggregated, or related attributes.

Computed fields let you enrich a model with attributes that do not exist in its source data, without changing the original table in your data warehouse.

They help you transform existing values, summarize data from related models, create business classifications, or make a field from a related model available for an activation.

Once created, a computed field appears in the schema of its parent model. Depending on its type, it can be used in segments, previews, and activations.

Types of computed fields

DinMo provides four types of computed fields:

Type
Use it when you need to

Calculate a value from multiple records in a related model.

Create a value by applying an operation to fields in the same model.

Classify records into business-friendly categories using conditions.

Map a field from a singular related model in an activation without adding it to the parent model.

Why use computed fields?

Computed fields help you keep source models focused on their purpose while making their data more useful for business use cases.

For example, you can:

  • Calculate a customer's lifetime value from transaction data.

  • Create a churn-risk label from existing scores and attributes.

  • Calculate a future date from an existing date.

  • Map a product attribute in a transaction activation without duplicating product data in the Transactions model.

Choose between live and materialized fields

Computed fields can be live or materialized.

A live computed field is recalculated each time it is used. Choose this option when freshness is the priority, especially when your warehouse data is updated in real time or when the field is used in an activation.

A materialized computed field is calculated in advance and stored in your data warehouse with its parent model. Choose this option when the calculation is complex, when the field is used frequently, or when you need stable and performant results for segmentation.

Consideration
Recommended mode

The warehouse is updated in real time and freshness is essential

Live

The field is primarily used in an activation

Live

The calculation is complex

Materialized

The field is used frequently in segments or previews

Materialized

Segmentation requires predictable performance and stable results

Materialized

The right choice depends on the use case: materialize a field to improve performance and stability for segmentation; keep it live when freshness is most important for activation.

How to use a computed field

Use a live computed field

A live computed field is calculated at the time it is used. You can use it to:

  • Preview current values in a model.

  • Map current values in an activation.

Because the field is recalculated on demand, it reflects the latest data available in the parent model.

Related fields are live fields. They are designed for activation mappings and are not available in the Segment Builder.

Use a materialized computed field

A materialized computed field is updated with the materialization of its parent model. You can use it to:

  • Build segments that need stable and performant calculations.

  • Preview a consistent snapshot of the field.

  • Map the value in an activation after the latest materialization run.

The field is refreshed according to the materialization schedule of its parent model. For more information, see Model materialization.

Manage computed fields safely

Changes to a computed field are reflected across the workspace. Renaming a field does not affect objects that use it, but changing its type or deleting it can affect segments, activations, or other dependent objects.

Before applying a change, review the impacted objects listed by DinMo.

Last updated