Skip to main content

Error message

{path}: {detail}; {path}: {detail}; ...
Examples:
  • price: mean is not compatible with type string
  • address: primitive config does not match schema type object
  • events.payload: property 'user_agent' not found in schema

When this error occurs

After the configuration passes structural validation (no duplicate stats, no mixed node types, etc.), the server validates it against the actual schema of the dataset or Rosetta Stone attributes. This error is raised when the configured statistics are incompatible with the field types in the schema. There are four categories of type validation errors:

1. Stat incompatible with field type

A statistic is requested on a column whose type does not support it. Type compatibility rules:
StatCompatible types
value_count, null_value_count, completenessAll types
approx_count_distinct, count_distinctAll types
histogramAll types
mean, standard_deviationNumeric only (long, double)
nan_value_countNumeric only (long, double)
lower_bound, upper_boundOrdered types (long, double, timestamp_tz, string)
Example: requesting mean on a string column.
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "fields": [
      {
        "field_name": "country",
        "enabled_stats": ["value_count", "mean"]
      }
    ]
  }
}
If country is a string column in the dataset schema, the server returns:
country: mean is not compatible with type string
Fix: Remove mean and use stats compatible with strings:
{
  "field_name": "country",
  "enabled_stats": ["value_count", "approx_count_distinct"]
}

2. Shape mismatch between config and schema

The configuration structure does not match the field’s schema type. For example, using primitive config fields (enabled_stats) on an object column, or using non-primitive config fields (properties) on a string column. Example: treating an object column as a primitive.
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "fields": [
      {
        "field_name": "address",
        "enabled_stats": ["value_count", "histogram"]
      }
    ]
  }
}
If address is an object column (with children city, zip, state), the server returns:
address: primitive config does not match schema type object
Fix: Use non-primitive config for object columns:
{
  "field_name": "address",
  "self": {
    "enabled_stats": ["null_value_count"]
  },
  "properties": [
    {
      "path": "city",
      "enabled_stats": ["value_count", "histogram"]
    }
  ]
}
The reverse also applies — using object config on a primitive column:
{
  "field_name": "user_id",
  "properties": [
    {
      "path": "name",
      "enabled_stats": ["value_count"]
    }
  ]
}
If user_id is a string, the server returns:
user_id: object config does not match schema type string

3. Unknown property in schema

A property listed in the properties array does not exist in the object’s schema. Example: configuring a non-existent child property.
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "fields": [
      {
        "field_name": "address",
        "properties": [
          {
            "path": "city",
            "enabled_stats": ["value_count"]
          },
          {
            "path": "country",
            "enabled_stats": ["value_count"]
          }
        ]
      }
    ]
  }
}
If address has children city, zip, and state but no country, the server returns:
address.country: property 'country' not found in schema
Fix: Remove the property or correct the path to match the schema:
{
  "field_name": "address",
  "properties": [
    {
      "path": "city",
      "enabled_stats": ["value_count"]
    },
    {
      "path": "state",
      "enabled_stats": ["value_count"]
    }
  ]
}

4. Nested type incompatibility

For deeply nested structures (arrays of objects, objects containing arrays), the validation recurses into children. Errors report the full path. Example: requesting mean on a string property inside an array of objects. Consider a dataset with column events of type array<object<name: string, score: double>>.
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "fields": [
      {
        "field_name": "events",
        "self": {
          "enabled_stats": ["null_value_count"]
        },
        "items": {
          "properties": [
            {
              "path": "name",
              "enabled_stats": ["value_count", "mean"]
            },
            {
              "path": "score",
              "enabled_stats": ["value_count", "mean"]
            }
          ]
        }
      }
    ]
  }
}
The score field (double) supports mean, but name (string) does not. The server returns:
events.[].name: mean is not compatible with type string
Fix: Remove mean from the string property:
{
  "path": "name",
  "enabled_stats": ["value_count", "approx_count_distinct"]
}

5. Field not found in dataset schema

A field_name in the dataset.fields array does not match any column in the dataset.
{
  "defaults": {
    "enabled_stats": ["value_count"]
  },
  "refresh": { "trigger": "manual" },
  "dataset": {
    "fields": [
      {
        "field_name": "nonexistent_column",
        "enabled_stats": ["value_count"]
      }
    ]
  }
}
nonexistent_column: field 'nonexistent_column' not found in dataset schema
Fix: Verify the column name matches the dataset schema exactly. Column names are case-sensitive.

Multiple errors in one response

The validator reports all errors found, not just the first. Multiple errors are separated by semicolons:
price: mean is not compatible with type string; address: primitive config does not match schema type object; events.[].name: nan_value_count is not compatible with type string

Quick reference: common mistakes

MistakeErrorFix
mean on a string columnmean is not compatible with type stringUse approx_count_distinct or histogram instead
nan_value_count on a non-numeric columnnan_value_count is not compatible with type booleanRemove — NaN only applies to floats
lower_bound on a boolean columnlower_bound is not compatible with type booleanRemove — booleans have no meaningful ordering
Flat stats on an object columnprimitive config does not match schema type objectUse self + properties instead of enabled_stats
Object config on a scalar columnobject config does not match schema type stringUse enabled_stats directly
Non-existent property in propertiesproperty 'x' not found in schemaCheck the schema for correct property names
Non-existent field in fieldsfield 'x' not found in dataset schemaCheck the dataset schema for correct column names