---
schema_version: "1"
id: 78e3fda94feabe67f2df46cbc515b0fd21c735383a6413c812eb122b324b517f
title: Upsert Data Load Mode
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/dato_data_load_mode_upsert.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.dato_data_load_mode_upsert.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 64bf04ff15e9eb5c6ed88ee89fa94220596f4c6448f16794544957bd8fbf74c7
description: "The upsert data load mode inserts new data by updating main entity keys that exist in previous files. With this mode, two actions are performed: update and insert. Measurement data linked to main entity keys that exist in the previous file is updated, and then new main entity keys are inserted as new rows of data."
products:
  - Marketing
  - Marketing Cloud Intelligence
release: "264"
---
# Upsert Data Load Mode

The upsert data load mode inserts new data by updating main entity keys that exist in previous files. With this mode, two actions are performed: update and insert. Measurement data linked to main entity keys that exist in the previous file is updated, and then new main entity keys are inserted as new rows of data.

These tables show what happens when using Upsert mode.

**Existing data**

![upsert\_existing\_data](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/salesforce_datorama/images/data/dato_data_upsert_example1.png)

**Uploaded file**

![upsert\_uploaded\_file](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/salesforce_datorama/images/data/dato_data_upsert_example2.png)

Blue cells represent data different from the existing data.

**After Upsert load mode is applied**

![upsert\_after\_applied](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-salesforce_datorama-264-0-0-production-enus/d38a342d-dd4a-4af8-8343-f372280a75dd/salesforce_datorama/images/data/dato_data_upsert_example3.png)

Green cells represent updated data, while orange cells represent new keys that were inserted into the data.

For the keys existing in the platform, the measurement data updates to the values included in the recent file that was uploaded. For example, the measurement values for Media Buy Keys NO1 and NO3 were updated. New keys were inserted to the data, for example Media Buy Key NO4.

To determine whether to update or insert a row, these items are considered:

- The data's date
- The Main Entity key
- The entities that are linked to the Main Entity key in a many to many connection