> ## 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.

# Duplicate Field Names

> The same field name appears more than once in a namespace fields array

## Error message

```
{context}: duplicate field names: {names}
```

Example: `dataset.fields: duplicate field names: user_id`

## When this error occurs

Each entry in the `fields` array of a `dataset` or `rosetta_stone` namespace must have a unique identifier (`field_name` or `attribute_name`). This error is raised when two or more entries share the same name.

## Example: request that triggers this error

```json theme={null}
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "fields": [
      {
        "field_name": "user_id",
        "enabled_stats": ["value_count", "count_distinct"]
      },
      {
        "field_name": "user_id",
        "enabled_stats": ["value_count"]
      }
    ]
  }
}
```

`user_id` appears twice in `dataset.fields`.

## How to fix

Remove the duplicate entry. If you intended different configurations, merge them into a single entry:

```json theme={null}
"dataset": {
  "fields": [
    {
      "field_name": "user_id",
      "enabled_stats": ["value_count", "count_distinct"]
    }
  ]
}
```

## Related errors

* [DuplicatePropertyPaths](/reference/architecture/dataset-statistics/errors/duplicate-property-paths) — same issue for nested property paths
