Skip to main content

Error message

{context}: scope must have at least one of enabled_stats or stat_options

When this error occurs

The scope field within a namespace (dataset.scope or rosetta_stone.scope) must contain at least one of:
  • enabled_stats — an explicit stat set
  • stat_options with at least one actual option (e.g., histogram with tuning parameters)
This error is raised when scope is present but effectively empty — for example, stat_options: {} with no enabled_stats, or stat_options: { "histogram": null }.

Example: request that triggers this error

{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "scope": {
      "stat_options": {}
    }
  }
}
The scope has stat_options but no actual options inside it.

How to fix

Add meaningful content to the scope:
"dataset": {
  "scope": {
    "enabled_stats": ["value_count", "null_value_count", "histogram"]
  }
}
Or provide actual stat options:
"dataset": {
  "scope": {
    "stat_options": {
      "histogram": { "max_bins": 200 }
    }
  }
}
If you don’t need a scope override, remove the scope field and use fields only, or remove the namespace entirely.