Change your data schema

Introduction

The user data table is built from columns and populated with user records. Each column has a data type (describing what the column stores, like string or boolean). Columns can store a single data value or multiple values, in which case they are called array columns.

Columns can be managed via the UI, or programmatically via the API.

Managing Columns in the UI

Columns can be managed in the User Store page of UserClouds Console.

Columns can be managed from the User Store page of the UserClouds Console.

Columns can be managed from the User Store page of the UserClouds Console.

Adding Columns

To add a column, go to the User Store page (pictured above), click Edit Columns and then click Add Column. You will be prompted to define:

  • Name: The unique human-readable identifier for the column.
  • Data Type: Specifies the type of data the column holds, supporting both basic and composite data types. For more info, see our Data Types Documentation
  • Array-ness: Determines whether the column can hold multiple values for each record
  • Unique Values For User (formerly UniqueRequired): Ensures all values in the column for a single user are unique.
  • Unique IDs For User: Available only for composite columns, this attribute means a unique ID will be generated for each value of the column unless provided by the customer
  • Allow Partial Updates: Available for array columns when either "Unique IDs for User" or "Unique Values for User" is true, allowing for modifications to a subset of the array.
  • Immutable: Indicates that once a value is set, it cannot be changed, although values can be added or removed. This is only applicable for composite columns with "Unique IDs for User" enabled. With this constraint, users can add or remove values but cannot modify the existing values. This is to ensure the immutability of data points associated with a unique ID.
  • UniqueValuesWithinTenant: Ensures that values in the column are unique across all users within the tenant. This constraint is available for data types with concrete type string, int, and UUID.

Updating Columns

The only column characteristics that are mutable are (1) whether the column is indexed and (2) the default value. To change either setting in the UI, click Edit Columns, edit the value in question in line, then click "Save Changes".

Deleting Columns

To delete a column in the UI, go the User Store page, click Edit Columns, and click the Trash icon on the right hand side, then click "Save Changes".

The Edit Columns interface in the User Store page. When the user clicks "Save Changes", the first column will be deleted, and the default value for the second column will be changed to "xx".

The Edit Columns interface in the User Store page. When the user clicks "Save Changes", the first column will be deleted, and the default value for the second column will be changed to "xx".

Managing Columns via the API

To learn how to manage columns via the UserClouds API, consult our API Reference.