Editing the enrichment suggestions file

Edit the enrichment suggestions file to identify which objects should not be proposed as measures or as time or geographic attributes on the Measures and Dimensions panel.

You can define as many rules as you require in the enrichment_suggestions.<VersionNumber>.txt file. For each rule, you must declare four properties. The syntax is Java regex and metadata is not case-sensitive.
Table 1: Properties required for each rule in the enrichment suggestions file

Required property

Description

objectName

Pattern matching on the object name (column header). Any character can be used. When .*DAY.* is used, any object containing the string DAY is included in the rule (MONDAY, TUESDAY, and so on).

dataType

List of data types. Recognized data types are:
  • integer
  • biginteger
  • double
  • string
  • date
  • boolean
Any column name, with any data type, will be considered for exclusion from the proposal pane. If no dataType property is declared, all data types are considered.

enrichment

Prevents objects from appearing. The values are MEASURE or TIME (time hierarchy objects) or GEO (geographic hierarchy objects).

rule

Defaults to hide. Do not change this value.

The following example shows the default enrichment file:
{
 "version":"1.0",
 "policies":{ 
    },
    "suggestionRules":[
    {
      "objectName":"(?i).*year.*|.*month.*|.*quarter.*
                   |.*week|.*day|.*semester.*|.*hour|.*minute|.*second",
      "dataTypes":["integer", "biginteger", "double"],
      "enrichment":"MEASURE",
      "rule":"hide"
    },
    {
      "objectName":"(?i).*zip.*",
      "dataTypes":["integer", "biginteger", "double"],
      "enrichment":"MEASURE",
      "rule":"hide"
    },
    {
      "objectName":"(?i).*_id\\d*",
      "dataTypes":["integer", "biginteger", "double"],
      "enrichment":"MEASURE",
      "rule":"hide"
    },
    {
      "objectName":"(?i).*key.*",
      "dataTypes":["integer", "biginteger", "double"],
      "enrichment":"MEASURE",
      "rule":"hide"
    },
    {
      "objectName":"(?i).*zip.*",
      "dataTypes":["integer", "biginteger", "double"],
      "enrichment":"TIME",
      "rule":"hide"
    },
    {
      "objectName":"(?i).*_id\\d*",
      "dataTypes":["integer", "biginteger", "double"],
      "enrichment":"TIME",
      "rule":"hide"
    },
    {
      "objectName":"(?i).*key.*",
      "dataTypes":["integer", "biginteger", "double"],
      "enrichment":"TIME",
      "rule":"hide"
    }
    ]
}
  1. Open the enrichment_suggestions.<VersionNumber>.txt file in a text editor.
  2. For each object, define the data type(s), enrichment, and other properties as needed.
    You must keep "rule" set to "hide".
  3. Save the file with the same name.