Create a data class

Important 

In Collibra 2024.05, we launched a new user interface (UI) for Collibra Data Intelligence Platform! You can learn more about this latest UI in the UI overview.

Use the following options to see the documentation in the latest UI or in the previous, classic UI:

You can create data classes via the asset pages where you can update the classification or via the Data Classification page in the Stewardship application.
To update and delete data classes, especially the data classification rules, you must use the Data Classification page in the Stewardship application.

Prerequisites

  • You have a global role that has the Product Rights > Catalog global permission.
  • You have a global role that has the Data Stewardship Managerglobal permission.
  • You have a global role that has the Classification > Data Classes > Read global permission.
  • You have a global role that has the Classification > Data Classes > Add global permission.

For more information, go to Required permissions.

Steps

  1. On the main toolbar, click Products icon, and then click Stewardship.
  2. Click the Data Classification tab.
  3. If the data class doesn't exist yet:
    1. Click Add.
    2. Type the name of the data class and press Enter.
    3. Click Create.
  4. Select the data class that you want to configure.
  5. The data class parameters appear in a pane on the right-hand side.
  6. Optionally, add a description by clicking the Description field, typing the description, and clicking outside the field.
  7. Optionally, add a description by clicking the Edit icon next to the Description field.
  8. Open the Details section.
  9. Complete the fields as required.
    Data class elementDescription
    Minimum confidence threshold

    The confidence percentage that must be reached for the data class to be considered as a possible classification result. The confidence percentage refers to the percentage of values in a column that match at least one of the classification rules in a data class, for example, the regular expression.

    Enter a value between 0 and 100.
    The default value is 0.

    Example If you add value 80 in this field, this data class will be suggested by the automatic data classification process only if the confidence percentage reaches 80 percent or higher.

    Tip Confidence scores of 0 are never taken into account.

    Include empty values

    Indicates if you want to include empty values in the confidence percentage calculation.
    The possible values are:

    • True True: If the value is set to true, empty values are taken into account by the data classification process when calculating the confidence percentage of a matching data class.
    • False False (Default): If the value is set to false, only the non-empty values are taken into account by the data classification process when calculating the confidence percentage of a matching data class.

    This option can be used to receive an accurate confidence score for all data in a column.

    Example 

    You have a column Z with 40 empty values and 60 phone numbers. You have a data class A with a regular expression to detect US phone numbers.

    • If you set this option to False and you classify column Z, data class A could be suggested with a confidence percentage of 100.
    • If you set this option to True and you classify column Z , data class A could be suggested but with a confidence percentage of only 60.

    Important Some regular expressions are constructed to allow a match with empty values. This means that, through the regular expression, empty values can be matched to the data class, which affects the confidence score.
    Example:
    This expression won't match empty values with the email data class:
    ^([a-zA-Z0-9._%\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,6})$
    This expression will match empty values with the email data class:
    ^([a-zA-Z0-9._%\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,6})*$

    Examples

    Some examples of values that match the classification rule for the data class.

    Add one example per line.

    To change a value, click the Edit icon .
    To save the value, click the Save icon.

  10. Open the Classification rules section.
  11. Click Add new rule.

    A data class without a classification rule can be used only for manual classification.
    You need to add at least one classification rule to allow automatic data classification. A data class can contain multiple classification rules. Each rule is verified against the data, and the data class is assigned as soon as one of the rules applies. A data class can also contain various types of classification rule.

  12. From the Type list, select the type of classification rule that you want to add to the data class. The possible values are: Regular expression and List of values.
    Tip 

    Use a regular expression when you can validate a pattern. Email addresses, for example, follow a specific format.
    Use a list of values when you can check for specific, predefined options. T-shirt sizes, for example, are predefined.

    Depending on your selection, extra fields appear.

  13. Complete the fields as required.

    Fields for Regular expressions:

    Data class elementDescription
    Regular expression

    A regular expression, also referred to as regex or regexp, is a sequence of characters that specifies a match pattern in text. Multiple regular expression grammar variants exist. We use the Java variant.

    Example A regular expression for an email address can be ^[a-zA-Z0-9._%\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,6}$

    Tip 
    • Multiple websites provide guidelines and examples of regular expressions, for example, Regexlib and RegexBuddy, or even ChatGPT.
    • You can also test your regular expression on various websites, for example, Regex101 (Select the Java 8 option in the Flavor panel).

    The referenced websites serve only as examples. The use of ChatGPT or other generative AI products and services is at your own risk. Collibra is not responsible for the privacy, confidentiality, or protection of the data you submit to such products or services, and has no liability for such use.

    Important 

    The required format of the regular expression is different between the UI and the API. In the API backslashes must be added twice (escaped). In the UI, this is not needed. For example: In the
    UI, use ^\+?\d{1,3}?\d{1,4}$, and in the API, use ^\\+?\d{1,3}?\\d{1,4}$.

    Description

    A description of the classification rule.

     

    Fields for List of Values:

    Data class elementDescription
    Upload a file

    Use this to upload a csv file with possible data class values. The file must contain one value per line. The maximum file size of 100 MB.

    This method is mandatory if you want to add more than 1,000 values.

    Download file

    If you download a file, the name of the file is: listofvalues_ID of the data class rule.

    Values

    Add the values that define a specific data class.

    Example 

    A data class for T-shirt sizes based on a list of values could be:

    S

    M

    L

    small

    medium

    large

    Important 
    • Add only one value per line.
    • The maximum number of characters in a single list value is 10,000.
    • Don’t add any leading or trailing blank characters in a value.
    • The values are not case-sensitive, the value “small” in the list will also be a match with the values “Small” and “SMALL”.
    • The maximum total number of values in one data class is 25,000. This number can be spread over multiple classification rules.
    Description

    A description of the classification rule.

  14. Click Save.
    The classification rule for the data class is configured.
    A new section appears. If you expand the section, the details are shown.
  15. If needed click Add new rule to add another classification rule to the data class.
    • You can combine regular expressions and list of values rules in one data class.
    • The maximum number of rules in a data class is 25.

What's next?

Go to some examples

Import out-of-the-box data classes

Merge data classes