# Viewing and editing the data model

> :::important
Always make sure your data model adheres the requirements. See [Data model requirements](https://docs.uipath.com/process-mining/automation-suite/2023.10/user-guide/data-model-requirements#data-model-requirements).
:::

:::important
Always make sure your data model adheres the requirements. See [Data model requirements](https://docs.uipath.com/process-mining/automation-suite/2023.10/user-guide/data-model-requirements#data-model-requirements).
:::

1. Select **Data model** to view the data model of your process app.

See [Editing and testing data transformations](https://docs.uipath.com/process-mining/automation-suite/2023.10/user-guide/editing-and-testing-the-data-transformations#editing-and-testing-data-transformations) for more information on how to change the data model.

## Validation checking

A notification is displayed if your data model does not meet the requirements.

   ![docs image](https://dev-assets.cms.uipath.com/assets/images/process-mining/process-mining-data-model-does-not-meet-the-requirements-369298-0f065417-e1f0a8a8.webp)

See [Data model requirements](https://docs.uipath.com/process-mining/automation-suite/2023.10/user-guide/data-model-requirements#data-model-requirements).

## Adding a table

1. Select **+ Add table**. The **Add table** dialog is displayed.
2. Select the table that defines the new output table.
3. Select the **Primary key** for the new table, and select **Done**.

See [Adding tables](https://docs.uipath.com/process-mining/automation-suite/2023.10/user-guide/adding-tables#adding-tables) for more information on how to add a table in the transformations.

## Adding relations

1. Select the table that you want to relate to another table. The **Edit table** panel is displayed.
2. In the **Edit table** panel, select **+ Add new** to create a new relation.
3. Select the field that you want to use in this table from the **Key** list.
4. Select the **Table** you want to connect to and select the field that use to connect from the **Key** list.
5. Select **Apply**.

## Changing the key for a table

1. Select the table for which you want to change the key. The **Edit table** panel is displayed.
2. In the **Edit table** panel, locate the relation for which you want to change the key.
3. Select the new field that is to be used as the **Key** to join the tables.
4. Select **Apply.**
   :::note
   If you change the primary key, the field that you select as the new primary key is duplicated in the table. You can delete the original field in **Data Manager.** ![docs image](https://dev-assets.cms.uipath.com/assets/images/process-mining/process-mining-duplicate-key-376870-a6bfa7d5-eaba4aa9.webp)
   :::

## Deleting a relation

1. Select the table for which you want to delete an outgoing relation. The **Edit table** panel is displayed.
2. In the **Edit table** panel, locate the relation you want to delete and select **Delete relation**.
3. Select **Apply**.

## Deleting a table

1. Select the table that you want to delete in the data model editor. The **Edit table** panel is displayed.
2. Select **Delete table**. A confirmation message is displayed.
3. Select **Delete** to continue.

The table and the relations are deleted from the data model.

## Making the new data model available for use in dashboards

1. Select **Save** to save the data model.
2. Select **Apply to dashboards** to run the transformations and make new the table available for use in dashboards.
   :::note
   This may take several minutes. If the run finishes successfully, the changes to the data model will show up in the **Data Manager.**
   :::

:::note
The **Save** option is only enabled, after you made any changes to the data model.
:::
