Updated on 2025-08-28 GMT+08:00

Adding a KV Item

Scenarios

You will add a KV item to a table.

Prerequisites

The table where you want to add a KV item has been created.

Notes and Constraints

  • The KV data type can be a string, Boolean value, null value, floating-point number, array, mapping, date, or ObjectId. The total size of keys and values in a KV item cannot exceed 512 KB, including the primary key and local secondary indexes.
  • A field name must be 1 to 63 bytes long. It is case sensitive and cannot contain periods (.) or dollar signs ($). A field name prefixed with X is a reserved name. The existing reserved field names are Xattr and Xblob. You are advised not to use them as field names.

Procedure

  1. Log in to the KVS console.
  2. In the navigation pane, choose Stores.
  3. Search for and select a store and then a table where you want to add a KV item.
  4. Click the KV Items tab.
  5. Click Add KV Item in the upper left corner.

    Figure 1 Adding a KV item

  6. Specify the mandatory fields of the shard key and sort key.
  7. (Optional) To add other fields, click Add. Choose a KV data type and specify the field name and value. The KV type can be a string, Boolean value, null value, floating-point number, integer, long integer, array, mapping, binary value, date, timestamp, regular expression, Decimal128 value, or ObjectId.
  8. Confirm the configuration and click OK.
  9. Check whether the KV item you added is in the KV list.