> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/more-details/applications/application-modules/updatemodel.md).

# Update Model

> Retrain or update an existing Digital Twin with new data.

Updates an existing digital twin with new rows instead of retraining it from scratch.

The nightly counterpart of TrainModel: same twin, new data, a new version. Durable and long-running for the same reason.

## At a glance

|                          |                        |
| ------------------------ | ---------------------- |
| Module type              | `UpdateModel`          |
| Category                 | Intelligence           |
| Default tier             | `durable`              |
| Runs on                  | `reactive`, `durable`  |
| Starts a flow            | no                     |
| Holds a body             | no                     |
| Keeps state between runs | no                     |
| Available in             | every application type |

## Parameters

### `digitalTwinId`

`string` · required · defaults to `""`

The twin to update.

### `digitalTwinName`

`string` · optional

Its name when it was chosen, for the node's label.

### `digitalTwinVersionId`

`string` · optional

The version this module last produced.

### `updateConfig`

`Record<string, unknown>` · optional

Update options passed through to the pipeline.

## Inputs

| Port   | Kind        | Required | Description                                                                                                                           |
| ------ | ----------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `on`   | `event`     | no       | Implicit on every module that does not itself start a flow: wire an event here to make this module the start of what that event runs. |
| `data` | `dataframe` | yes      | The rows to update with.                                                                                                              |

## Outputs

| Port    | Kind     | Connects to                | Description                          |
| ------- | -------- | -------------------------- | ------------------------------------ |
| `model` | `json`   | `json`, `scalar`, `signal` | The twin version this run produced.  |
| `done`  | `signal` | `signal`                   | Fires once the update has committed. |

***

[← All application modules](/more-details/applications/application-modules.md)
