Help Center/ DataArts Studio/ FAQs/ DataArts Migration (Real-Time Jobs)/ What Should I Do If an Error Occurs When Logical Deletion Is Enabled for Real-Time Data Synchronization from GaussDB to GaussDB(DWS)?
Updated on 2025-08-05 GMT+08:00

What Should I Do If an Error Occurs When Logical Deletion Is Enabled for Real-Time Data Synchronization from GaussDB to GaussDB(DWS)?

Symptom

For a real-time job for migrating data from GaussDB to GaussDB(DWS), logical.delete.enabled is set to true in the advanced attribute settings of the destination. If the destination table contains a field that is not the primary key and not null, the following error occurs when you delete data at the source: null value in column "xxx" violates not-null constraint.

Possible Causes

If logical deletion is enabled, the delete SQL statement is changed to the update SQL statement, which only updates the values in the columns with deletion markers. This prevents unexpected values from being written to the destination. However, GaussDB(DWS) still checks whether there are non-null values synchronized from the source for the fields that are not primary keys and not null.

Solution

Change the type of the non-primary key fields at the destination from not null to null, or add the default value default to the fields that are not null.

Note that logical deletion is not supported if there are no primary key tables at the destination.