Skip to main content

Error message

{context}: histogram options provided but histogram stat is not enabled; enable the stat or remove the options

When this error occurs

stat_options.histogram tunes the behavior of the histogram stat. If histogram is not present in the resolved stat set for that level, the options have nothing to apply to and the server rejects the configuration. This can happen in three scenarios:

Scenario 1: enabled_stats is present but does not include histogram

{
  "defaults": {
    "enabled_stats": ["value_count", "null_value_count"],
    "stat_options": {
      "histogram": { "max_bins": 200 }
    }
  },
  "refresh": { "trigger": "manual" }
}
The stat set is [value_count, null_value_count] — no histogram, so the options are invalid.

Scenario 2: stat_options-only at a level where the parent has no histogram

{
  "defaults": {
    "enabled_stats": ["value_count", "mean"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "scope": {
      "stat_options": {
        "histogram": { "max_bins": 200 }
      }
    }
  }
}
The scope inherits the stat set from defaults [value_count, mean] — no histogram to tune.

Scenario 3: stat_options-only at scope when defaults has an empty stat set

{
  "defaults": {
    "enabled_stats": []
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "scope": {
      "stat_options": {
        "histogram": { "max_bins": 200 }
      }
    }
  }
}
Defaults disable all stats (empty array). The scope inherits an empty set — no histogram to tune.

How to fix

Either add histogram to enabled_stats, or remove the histogram options: Option A: Enable the stat
{
  "defaults": {
    "enabled_stats": ["value_count", "null_value_count", "histogram"],
    "stat_options": {
      "histogram": { "max_bins": 200 }
    }
  },
  "refresh": { "trigger": "manual" }
}
Option B: Remove the options
{
  "defaults": {
    "enabled_stats": ["value_count", "null_value_count"]
  },
  "refresh": { "trigger": "manual" }
}