User-defined types (UDTs) in Amazon Keyspaces - Amazon Keyspaces (for Apache Cassandra)
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

User-defined types (UDTs) in Amazon Keyspaces

A user-defined type (UDT) is a grouping of fields and data types that you can use to define a single column in Amazon Keyspaces. Valid data types for UDTs are all supported Cassandra data types, including collections and other UDTs that you've already created in the same keyspace. For more information about supported Cassandra data types, see Cassandra data type support.

You can use user-defined types (UDTs) in Amazon Keyspaces to organize data in a more efficient way. For example, you can create UDTs with nested collections which allows you to implement more complex data modeling in your applications. You can also use the frozen keyword for defining UDTs.

UDTs are bound to a keyspace and available to all tables and UDTs in the same keyspace. You can create UDTs in any single-Region keyspace.

You can create new tables or alter existing tables and add new columns that use a UDT. To create a UDT with a nested UDT, the nested UDT has to be frozen.

To review how many UDTs are supported per keyspace, supported levels of nesting, and other default values and quotas related to UDTs, see Quotas and default values for user-defined types (UDTs) in Amazon Keyspaces.

For more information about CQL syntax, see User-defined types (UDTs).

To learn more about UDTs and point-in time restore, see PITR restore of tables with user-defined types (UDTs).