Help Center/ DataArts Studio/ User Guide/ DataArts Factory/ Real-Time Processing Migration Job Development/ FAQs/ Why Does DWS Filter the Null Value of the Primary Key During Real-Time Synchronization from MySQL to DWS?
Updated on 2024-10-23 GMT+08:00

Why Does DWS Filter the Null Value of the Primary Key During Real-Time Synchronization from MySQL to DWS?

Symptom

In a link from MySQL to DWS. The primary key of a manually created DWS table is different from that of the MySQL database. If the primary key field of DWS is a non-primary key field in MySQL and the field value is null in MySQL, an error is reported when data is written to DWS. The following figure shows the error message.

Figure 1 Error message

Possible Cause

In a link from MySQL to DWS. The primary key of a manually created DWS table is different from that of the MySQL database. If the primary key field of DWS is a non-primary key field in MySQL and the field value is null in MySQL, an error is reported.

Solution

Before writing data to DWS, filter the primary key field of DWS. If the field is null, print a warning log and do not write the data.