Define the properties of a field
After selecting the plus (+) icon, an Untitled field placeholder appears in in the canvas.
In the right rail under Field properties, you can configure the details of the new field. The following information is required for each field:
Field property | Description |
---|---|
Field name |
A unique, descriptive name for the field. Note that the field’s name cannot be changed once the schema has been saved. This value is used to identify and reference the field in code and in other downstream applications
|
Display name | A display name for the field. This is the name that will be used to represent the field within the Schema Editor canvas. The field name can be changed to the display name using the display name toggle. |
Type | The type of data the field will contain. From this dropdown menu, you can select one of the standard scalar types supported by XDM, or one of the multi-field data types that have been previously defined in the Schema Registry. Note: If you select the Map data type, then Map value type property appears. You can also select Advanced type search to search and filter existing data types and locate the desired type easier. |
Map value type | This value is required if you select Map as the data type for the field. Available values for the map are String and Integer. Select a value from the drop down list of available options. To learn more about type-specific field properties, see the define fields overview. |
You can also choose to provide a description and notes for each field. Use the Description field to add context and describe the functionality of the map data type. This contributes to the maintainability and readability of the implementation. You can also add notes to complement the initial description. This should offer more granular and specific information to help developers in understanding, maintaining, and utilizing the map effectively within the context of the codebase. |
Once you have finished configuring the field, select Apply.
The canvas updates to show the newly added field, located within an object that is namespaced to your unique tenant ID (shown as _tenantId
in the example below). All custom fields that are added to a schema are automatically placed within this namespace to prevent conflicts with other fields from Adobe-provided classes and field groups. The right rail now lists the field’s path in addition to its other properties.
You can continue to follow the steps above to add more fields to the schema. Once the schema is saved, its base class and field groups are also saved if any changes have been made to them.
Type-specific field properties
When defining a new field, additional configuration options may appear in the right rail depending on the Type you choose for the field. The following table outlines these additional field properties along with their compatible types:
Field property | Compatible types | Description |
---|---|---|
Map value type | Map | The Map value type property only appears in the UI if you select the Map value from the Type dropdown options. You can select between String and Integer value types for the Map.![]() Note: Any map data types created through the API that are not either a String or an Integer type are displayed as a ‘Complex’ data type. You cannot create ‘Complex’ data types through the UI. |
Pattern | String | A regular expression that the value for this field must conform to in order to be accepted during ingestion. |
Format | String |
Select from a list of pre-defined formats for strings that the value must conform to. Available formats include: |
Minimum length | String | The minimum number of characters the string must contain for the value to be accepted during ingestion. |
Maximum length | String | The maximum number of characters the string must contain for the value to be accepted during ingestion. |
Minimum value | Double | The minimum value for the Double to be accepted during ingestion. If the ingested value exactly matches the one entered here, then the value is accepted. When using this constraint, the “Exclusive minimum value” constraint must be left blank. |
Maximum value | Double | The maximum value for the Double to be accepted during ingestion. If the ingested value exactly matches the one entered here, then the value is accepted. When using this constraint, the “Exclusive maximum value” constraint must be left blank. |
Exclusive minimum value | Double | The maximum value for the Double to be accepted during ingestion. If the ingested value exactly matches the one entered here, then the value is rejected. When using this constraint, the “Minimum value” (non-exclusive) constraint must be left blank. |
Exclusive maximum value | Double | The maximum value for the Double to be accepted during ingestion. If the ingested value exactly matches the one entered here, then the value is rejected. When using this constraint, the “Maximum value” (non-exclusive) constraint must be left blank. |