Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

PartiQL data types for DynamoDB

Focus mode
PartiQL data types for DynamoDB - Amazon DynamoDB

The following table lists the data types you can use with PartiQL for DynamoDB.

DynamoDB data type PartiQL representation Notes
Boolean TRUE | FALSE Not case sensitive.
Binary N/A Only supported via code.
List [ value1, value2,...] There are no restrictions on the data types that can be stored in a List type, and the elements in a List do not have to be of the same type.
Map { 'name' : value } There are no restrictions on the data types that can be stored in a Map type, and the elements in a Map do not have to be of the same type.
Null NULL Not case sensitive.
Number 1, 1.0, 1e0 Numbers can be positive, negative, or zero. Numbers can have up to 38 digits of precision.
Number Set <<number1, number2>> The elements in a number set must be of type Number.
String Set <<'string1', 'string2'>> The elements in a string set must be of type String.
String 'string value' Single quotes must be used to specify String values.

Examples

The following statement demonstrates how to insert the following data types: String, Number, Map, List, Number Set and String Set.

INSERT INTO TypesTable value {'primarykey':'1', 'NumberType':1, 'MapType' : {'entryname1': 'value', 'entryname2': 4}, 'ListType': [1,'stringval'], 'NumberSetType':<<1,34,32,4.5>>, 'StringSetType':<<'stringval','stringval2'>> }

The following statement demonstrates how to insert new elements into the Map, List, Number Set and String Set types and change the value of a Number type.

UPDATE TypesTable SET NumberType=NumberType + 100 SET MapType.NewMapEntry=[2020, 'stringvalue', 2.4] SET ListType = LIST_APPEND(ListType, [4, <<'string1', 'string2'>>]) SET NumberSetType= SET_ADD(NumberSetType, <<345, 48.4>>) SET StringSetType = SET_ADD(StringSetType, <<'stringsetvalue1', 'stringsetvalue2'>>) WHERE primarykey='1'

The following statement demonstrates how to remove elements from the Map, List, Number Set and String Set types and change the value of a Number type.

UPDATE TypesTable SET NumberType=NumberType - 1 REMOVE ListType[1] REMOVE MapType.NewMapEntry SET NumberSetType = SET_DELETE( NumberSetType, <<345>>) SET StringSetType = SET_DELETE( StringSetType, <<'stringsetvalue1'>>) WHERE primarykey='1'

For more information, see DynamoDB data types.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.