> For the complete documentation index, see [llms.txt](https://help.whaly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.whaly.io/core-concepts/data-modeling/designing-data-models.md).

# Designing data models

## How to model data

Before creating a model, it's always useful to sit down with the people that will consume the explorations built over your model to understand which questions they will want to answer. By doing interview sessions, you will be able to identify :&#x20;

* The schema of your model
* The granularity of your model data
* The raw data you will use as input for your model

Once you know what your model output should be, you can use Whaly's built-in tools to build your data model :

#### Flow models

> You can think of flow models as a building block interface designed to reshape data. It's useful for data savvy users that need to build models but do not want to rely on a programming language such as SQL in order to do so.&#x20;
>
> Flow models are easy to get started with, are auditable and easily modifiable. They are a great choice for creating low to medium complexity models.

{% embed url="<https://docs.whaly.io/data-management/workbench/model-data/flow-models>" %}
To learn more about Flow models
{% endembed %}

#### SQL models

> SQL models allow you to go beyond flow capabilities, and offer the full possibility of a proven data programming language. Whaly models uses the SQL flavor of your datawarehouse.
>
> SQL models are a great choice when building complex models.

{% embed url="<https://docs.whaly.io/data-management/workbench/model-data/sql-models>" %}
To learn more about SQL models
{% endembed %}

Whether you use **Flow models** or **SQL models**, the tools you will be able to use are the following :

* **Joining or combining** data from different data sources
* **Transforming** values: renaming columns, filtering data, cleaning values, bucketing values, ...
* **Filtering** out data, either and entire line or column
* **Aggregating** or **ventilating** data in order to change the grain

Combining the tools above will give you the ability to easily reshape raw data into a new model that makes sense for your business and your users.

## Common modeling operations

When creating data models, we are often doing the following operations:&#x20;

* **Cleaning,** for example removing test values or duplicates.
* **Normalizing data**, for example, renaming values to apply a cross data naming convention, making sure data share the same units, ...
* **Combining data**, for example merging similar data into a new unique table.
* **Calculating complex values,** to simplify the most complex operations or apply your business rules.
* **Creating links** between your data model and the rest of the data your will analyze


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.whaly.io/core-concepts/data-modeling/designing-data-models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
