Skip to main content

Error message

{context}: only null_value_count is supported for non-primitive self configs; unsupported: {stat_names}
Example: dataset.fields[address].self: only null_value_count is supported for non-primitive self configs; unsupported: value_count, histogram

When this error occurs

The self field on a non-primitive node (object or array) configures stats for the container column itself — not its children. For a struct or array column, the only meaningful stat at the container level is null_value_count (counting rows where the entire container is NULL). Stats like value_count, histogram, mean, etc. don’t have well-defined semantics on a container value and are rejected.

Example: request that triggers this error

{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "fields": [
      {
        "field_name": "address",
        "self": {
          "enabled_stats": ["value_count", "null_value_count", "histogram"]
        },
        "properties": [
          {
            "path": "city",
            "enabled_stats": ["value_count"]
          }
        ]
      }
    ]
  }
}
self includes value_count and histogram, which are not supported for non-primitive self configs.

How to fix

Restrict self.enabled_stats to only null_value_count:
{
  "field_name": "address",
  "self": {
    "enabled_stats": ["null_value_count"]
  },
  "properties": [
    {
      "path": "city",
      "enabled_stats": ["value_count"]
    }
  ]
}
If you don’t need null counting on the container, remove self entirely:
{
  "field_name": "address",
  "properties": [
    {
      "path": "city",
      "enabled_stats": ["value_count"]
    }
  ]
}