Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter NameDescription
name

Internal identifier for the custom type. Must be unique across all standard types and custom types.

Info

NOTE: You should verify that your data type's name value does not conflict with other custom data type names.


prettyNameDisplay name for the custom type.
category

The category to assign to the type. The current categories are displayed within the data type drop-down for each column.

defaultProbabilityAssign a default probability for the custom type. See below.
testCaseThis block contains the regular expression specification to be applied to the column values.
stripWhitespaceWhen set to true, whitespace is removed from any value prior for purposes of validation. The original value is untouched.
regexes

This array contains a set of regular expressions that are used to validate the column values. For a regex type, the column value must match with at least one value among the set of expressions.

Info

NOTE: All match types must be double-escaped in the regex expression. For example, to replicate the \d pattern, you must enter: \\d.

D s product
 implements a version of regular expressions based off of RE2 and PCRE regular expressions.

probability(optional) Assign an incremental change to the probability when a match is found between a value and one of the regular expressions. See Defining probabilities 177671334 below.


Tip

Tip: In the types sub-directory, you can review the regex-based types that are provided with the

D s platform
. While you should not edit these files directly, they may provide some guidance and some regex tips on how to configure your own custom data types. 

...

To the $CUSTOM_TYPE_DIR/manifest.json file, you must add the filenames of any custom types that you have created and stored in the types directory:

Code Block
{
  "types": ["bodies-of-water.json", "dayofweek.json"],
  "dictionaries": ["oceans", "seas"]
} 

Enable custom types

Steps:

  1. D s config
  2. Locate the following property:

    Code Block
    "feature.enableCustomTypes": true,


  3. To enable use of your custom data types in

...

  1. the 

    D s platform
    , locate and edit enabledSemanticTypes property.

...



  1. Info

    NOTE: Add your entries to the items that are already present in enabledSemanticTypes. Do not delete and replace entries.


    Info

    NOTE: Do not use this parameter to attempt to remove specific data types. Removal of the default types is not supported.


    Code Block
    "webapp.enabledSemanticTypes": [
        "<CustomTypeName1>",
        "<CustomTypeName2>",
        "<CustomTypeNameN>"
    ]

    where:

    • <CustomTypeName1>

...

    •  corresponds to the internal name

...

    •  value for your custom data type.



  1. Save your changes and restart the platform.

Register your custom types

...