Skip to main content

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

{
  "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:
"dataset": {
  "fields": [
    {
      "field_name": "user_id",
      "enabled_stats": ["value_count", "count_distinct"]
    }
  ]
}