All Products
Search
Document Center

Tablestore:What do I do if the "Validate PK name fail" error message is returned when I use Tablestore SDKs?

Last Updated:Apr 01, 2025

If the "Validate PK name fail" error message is returned when you use Tablestore SDKs, make sure that the sequence of primary key columns that you specify is the same as the sequence of primary key columns in the data table.

Problem description

The following error message is returned when I use a Tablestore SDK to query data:

Caused by: [ErrorCode]:OTSInvalidPK, [Message]:Validate PK name fail

Possible cause

The sequence or names of primary key columns that you specify are different from the sequence or names of primary key columns in the data table.

Solution

Make sure that the sequence or names of primary key columns that you specify are the same as the sequence or names of primary key columns in the data table.