Skip to main content
All CollectionsWorkspaces
Normalizing your Data
Normalizing your Data

Learn the concepts and approaches to normalizing your data

Updated over a week ago

Data normalization is a crucial step in managing and optimizing data. It ensures data is structured, consistent, and ready for use across various applications. This guide explains how to normalize your data effectively using specific attributes and configurations.

Key Configuration Options for Normalization

Below are the common configurations available in your system for data attributes. Each configuration plays a role in ensuring your data is clean and usable.

1. Override Display Width

This option allows you to set a custom display width for a data field.

  • Use Case: Adjust the width to fit the content appropriately, improving the user interface.

  • How to Enable: Select the checkbox labeled "Override Display Width."

2. Enable Fallback Expression

A fallback expression ensures a default value is applied if the data element is missing. When enabled, an editor will appear where you can enter a SPEL (Spring Expression Language) expression. The root object will be the data object for the expression, and several predefined variables are available:

  • attribute: The current attribute.

  • document: The document containing the data.

  • metadata: Metadata associated with the document.

  • family: The family of the document.

Example SPEL Expressions for Fallback

  1. Set a default value:

    "Default Value"
  2. Use metadata to provide a fallback:

    metadata['author'] ?: 'Unknown Author'
  3. Use the document family as a fallback:

    family.name ?: 'General'

3. Enable Serialization Expression

Custom serialization expressions help define how data is formatted during serialization. When enabled, a SPEL expression can be applied to the data attribute value during serialization to formats such as JSON, XML, or CSV. The root object will be the data attribute, and the value to normalize is available as the variable #value.

Example SPEL Expressions for Serialization

  1. Convert a value to uppercase:

    #value.toUpperCase()
  2. Format a numeric value:

    T(String).format('%.2f', #value)
  3. Append a suffix to a string:

    #value + "_normalized"

4. Multivalue Attribute

This attribute allows multiple values to be stored for the same data field.

  • Use Case: Useful for fields requiring lists or collections (e.g., multiple email addresses).

  • How to Enable: Check the "Multivalue" option.

5. User Editable

This determines whether users can edit the attribute's value in forms.

  • Use Case: Allow users to modify data where appropriate.

  • How to Enable: Check the "User Editable" checkbox.

6. Not User Labeled

Decides whether the attribute appears as a label that users can customize.

  • Use Case: Hide attributes not relevant to user inputs.

  • How to Enable: Check the "Not User Labeled" option.

Best Practices for Data Normalization

  1. Define Clear Standards: Establish a consistent format for data fields (e.g., date formats, naming conventions).

  2. Use Multivalue Fields Wisely: Only enable multivalue attributes when necessary to avoid data complexity.

  3. Apply Default Values: Use fallback expressions to handle missing data gracefully.

  4. Test Serialization Expressions: Ensure custom serialization formats work as expected before applying them widely.

  5. Restrict User Edits: Limit user edits to fields that need manual intervention.

Benefits of Normalizing Your Data

  • Improved Consistency: Ensures uniformity in how data is stored and retrieved.

  • Better Data Quality: Reduces errors caused by missing or inconsistent data.

  • Enhanced Usability: Makes data easier to work with for reporting, analytics, and integrations.

  • Scalability: Simplifies data management as your system grows.

Did this answer your question?