Skip to main content

Tips on Designing Models

Introduction

In this document, you can find some tips and best practices in designing models in Holistics

Declare reusable model relationships

Aside from the option to specify ad-hoc model relationships when building dataset, you can also declare reusable model relationships in a relationships.aml file

When to use custom metrics

The Data Exploration UI already has most of the basic aggregation functions (sum, count, average...), and we are gradually introducing more complex but also commonly used aggregations (like running aggregations). In case your aggregation can be solved using the GUI, using them is recommended over custom-build metrics.

Custom metrics should only be used in case of complicated aggregation (like nested aggregation, or conditional aggregation...)

Document your models

Adding metadata (table description, field description, etc...) to important models is a good way to help you and your teammates have immediate context to what the model is about, and how to use it.

Hide fields that are not needed

It is important that your end-users are not confused by the large number of fields the models and datasets when they explore. When you hide a field, it is only hidden from the Exploration interface of Datasets but can still be seen when you edit your models.

You can hide a field by using the hidden parameter in the field definition.

Below are our guidelines for when it is usually better to hide them or leave them visible.

HIDEDON’T HIDE
  • Join Keys/IDs and compound primary keys
  • Field used to sort other fields
  • Field is purely technical and is only created for some calculations
  • Have you created a measure that shows the same result as the actual value field? (i.e. The field Revenue can be hidden once you have a measure that calculates the revenue)
  • The field is intended to be used in a visualization

    Let us know what you think about this document :)