Skip to main content

Error message

{context}: at least one of scope or fields must be provided
Example: dataset: at least one of scope or fields must be provided

When this error occurs

The dataset and rosetta_stone namespace objects are optional at the top level. But if you include one, it must contain at least scope, fields, or both. An empty namespace object has no effect and indicates a configuration mistake.

Example: request that triggers this error

{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {}
}
The dataset namespace is present but has neither scope nor fields.

How to fix

Either add content to the namespace or remove it entirely: Option A: Add a scope
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "scope": {
      "enabled_stats": ["value_count", "null_value_count"]
    }
  }
}
Option B: Add fields
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "fields": [
      {
        "field_name": "user_id",
        "enabled_stats": ["value_count", "count_distinct"]
      }
    ]
  }
}
Option C: Remove the namespace
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" }
}
If you want to disable stats for a namespace, use an empty enabled_stats array in the scope:
"dataset": {
  "scope": {
    "enabled_stats": []
  }
}