User-defined types (UDTs)

You can define a custom type to use in your table. For example, you can create a member type that includes a text field called email and a date field called birthday.

Fields in a user-defined type can be any of the supported field types, except for maps, lists, sets, or other user-defined types.

You can use a user-defined type as the type of a column or as the value type of a map, list, or set column. You can’t use a user-defined type as the key type of a map column.

You can’t use a user-defined type as a partitionKey or clustering key.

For examples defining a user-defined type, see Create a user-defined type (UDT). For an example using a user-defined type, see Create a table that uses a user-defined type (UDT).

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2025 | Privacy policy | Terms of use Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: Contact IBM