> ## Documentation Index
> Fetch the complete documentation index at: https://docs.narrative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Mixed Primitive and Non-Primitive Configuration

> A node cannot mix primitive fields (enabled_stats/stat_options) with non-primitive fields (self/properties/items)

## Error message

```
{context}: cannot mix primitive fields (enabled_stats/stat_options) with non-primitive fields (self/properties/items)
```

## When this error occurs

Each field or nested node is either **primitive** or **non-primitive**, and the configuration fields must match:

| Node kind                                | Allowed fields                  |
| ---------------------------------------- | ------------------------------- |
| Primitive (string, integer, float, etc.) | `enabled_stats`, `stat_options` |
| Non-primitive (object, array)            | `self`, `properties`, `items`   |

This error is raised when both sets of fields appear on the same node. The design is intentional: primitive and non-primitive nodes have fundamentally different stat semantics, and mixing them creates ambiguous configurations.

## Example: request that triggers this error

```json theme={null}
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "fields": [
      {
        "field_name": "address",
        "enabled_stats": ["value_count"],
        "properties": [
          {
            "path": "city",
            "enabled_stats": ["value_count"]
          }
        ]
      }
    ]
  }
}
```

The `address` field has both `enabled_stats` (primitive) and `properties` (non-primitive).

## How to fix

Choose the appropriate config shape for the field's actual schema type:

**If the field is an object (non-primitive):**

```json theme={null}
{
  "field_name": "address",
  "self": {
    "enabled_stats": ["null_value_count"]
  },
  "properties": [
    {
      "path": "city",
      "enabled_stats": ["value_count"]
    }
  ]
}
```

Use `self` for stats on the container column and `properties` for named children.

**If the field is a primitive (string, integer, etc.):**

```json theme={null}
{
  "field_name": "address",
  "enabled_stats": ["value_count"]
}
```

Remove `properties`, `items`, and `self`.

## Related errors

* [EmptyNodeConfig](/reference/architecture/dataset-statistics/errors/empty-node-config) — node with no configuration at all
* [UnsupportedSelfStats](/reference/architecture/dataset-statistics/errors/unsupported-self-stats) — only `null_value_count` allowed in `self`
