Skip to main content

Error message

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: Example: requesting mean on a string column.
If country is a string column in the dataset schema, the server returns:
Fix: Remove mean and use stats compatible with strings:

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.
If address is an object column (with children city, zip, state), the server returns:
Fix: Use non-primitive config for object columns:
The reverse also applies — using object config on a primitive column:
If user_id is a string, the server returns:

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.
If address has children city, zip, and state but no country, the server returns:
Fix: Remove the property or correct the path to match the schema:

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>>.
The score field (double) supports mean, but name (string) does not. The server returns:
Fix: Remove mean from the string property:

5. Field not found in dataset schema

A field_name in the dataset.fields array does not match any column in the dataset.
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:

Quick reference: common mistakes