Skip to main content

Error message

defaults: enabled_stats is required (no parent scope to inherit from)

When this error occurs

The defaults object is the root of the inheritance chain. Every other level (namespace scope, field overrides, nested nodes) can optionally omit enabled_stats and inherit from its parent. But defaults has no parent — so enabled_stats must be explicitly provided. This error is raised when:
  • defaults contains only stat_options without enabled_stats
  • defaults is an empty object

Example: request that triggers this error

{
  "defaults": {
    "stat_options": {
      "histogram": { "max_bins": 200 }
    }
  },
  "refresh": { "trigger": "manual" }
}
The server cannot determine which stats to compute because enabled_stats is missing from defaults.

How to fix

Add enabled_stats to the defaults object. Even if you only want to configure histogram options, you must declare the stat set:
{
  "defaults": {
    "enabled_stats": ["value_count", "null_value_count", "histogram"],
    "stat_options": {
      "histogram": { "max_bins": 200 }
    }
  },
  "refresh": { "trigger": "manual" }
}
To disable all stats globally, use an empty array:
{
  "defaults": {
    "enabled_stats": []
  },
  "refresh": { "trigger": "manual" }
}