Help Center/ DataArts Studio/ FAQs/ DataArts Migration (Real-Time Jobs)/ What Should I Do If a Doris Table Fails to Be Automatically Created When a Source Decimal Field Is Used as the Primary Key and Error "String Type should not be used in key column[xxx]" Is Reported for a Real-Time Job for Migrating Data from Hudi to Doris?
Updated on 2025-11-17 GMT+08:00

What Should I Do If a Doris Table Fails to Be Automatically Created When a Source Decimal Field Is Used as the Primary Key and Error "String Type should not be used in key column[xxx]" Is Reported for a Real-Time Job for Migrating Data from Hudi to Doris?

Symptom

During real-time data migration from Hudi to Doris, source decimal fields whose precision is greater than 27 are converted into strings during automatic table creation. When such a field is used as the primary key, table creation may fail.

Possible Causes

Doris of an earlier version (for example, 1.2) supports a maximum precision of 27 for decimal fields, so all fields whose precision exceeds 27 are converted to strings. However, a string cannot be used as the primary key, so a table cannot be created.

Solution

If the Doris version supports decimal fields whose precision is greater than 27, and a decimal field is used as the primary key, create a table manually at the destination.