UPSERT Runs Successfully but Doesn’t Insert or Update Data

UPSERT Runs Successfully but Doesn’t Insert or Update Data


Sometimes an integration run in Skyvia finishes with Success, but no new data is inserted or updated in the target table.
This situation most often occurs when using the UPSERT operation.

🔹Why this happens

UPSERT decides whether to Insert or Update a record based on the ID (primary key) field: 

  1. If ID is NULL, Skyvia performs an Insert.
  2. If ID is NOT NULL, Skyvia performs an Update.

If the source provides an ID value that does not exist in the target, Skyvia tries to update a record that isn’t there.
The run completes successfully, but no rows are changed — because there is nothing to update. This is expected behavior, not an error.

🔹When this typically occurs

  • Source and target do not share the same IDs

  • The source should not provide the target’s ID

  • Records should match by another business identifier (e.g., email, external code, number, etc.)

🔹Solution: Use Lookup mapping for the ID field

Instead of mapping the target ID directly, configure it as a Lookup based on another unique field.

In the Lookup settings, enable the Set null when no record found option. Result:

  1. If a matching record exists in the target, Skyvia performs an Update.
  2. If no matching record exists, the ID becomes NULL, and Skyvia performs an Insert.

🔹Steps to configure

  1. Open the integration task and go to Mapping.

  2. Find the ID (primary key) field in the target.

  3. Change its mapping type to Lookup.

  4. Select the source field(s) that uniquely identify the record.

  5. Enable Set null when no record found.

  6. Save and run the task again.



🔹Behavior With and Without a Lookup

When a matching record exists, the integration updates it whether a lookup is used or not.
When no matching record exists:

      • Without a lookup: no action is performed, but the run finishes successfully.
      • With a lookup: Skyvia inserts a new record as expected.