Error message
price: mean is not compatible with type stringaddress: primitive config does not match schema type objectevents.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:| Stat | Compatible types |
|---|---|
value_count, null_value_count, completeness | All types |
approx_count_distinct, count_distinct | All types |
histogram | All types |
mean, standard_deviation | Numeric only (long, double) |
nan_value_count | Numeric only (long, double) |
lower_bound, upper_bound | Ordered types (long, double, timestamp_tz, string) |
mean on a string column.
country is a string column in the dataset schema, the server returns:
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.
address is an object column (with children city, zip, state), the server returns:
user_id is a string, the server returns:
3. Unknown property in schema
A property listed in theproperties array does not exist in the object’s schema.
Example: configuring a non-existent child property.
address has children city, zip, and state but no country, the server returns:
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: requestingmean on a string property inside an array of objects.
Consider a dataset with column events of type array<object<name: string, score: double>>.
score field (double) supports mean, but name (string) does not. The server returns:
mean from the string property:
5. Field not found in dataset schema
Afield_name in the dataset.fields array does not match any column in the dataset.
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
| Mistake | Error | Fix |
|---|---|---|
mean on a string column | mean is not compatible with type string | Use approx_count_distinct or histogram instead |
nan_value_count on a non-numeric column | nan_value_count is not compatible with type boolean | Remove — NaN only applies to floats |
lower_bound on a boolean column | lower_bound is not compatible with type boolean | Remove — booleans have no meaningful ordering |
| Flat stats on an object column | primitive config does not match schema type object | Use self + properties instead of enabled_stats |
| Object config on a scalar column | object config does not match schema type string | Use enabled_stats directly |
Non-existent property in properties | property 'x' not found in schema | Check the schema for correct property names |
Non-existent field in fields | field 'x' not found in dataset schema | Check the dataset schema for correct column names |
Related errors
- Mixed Primitive and Non-Primitive Configuration — structural mismatch caught before type validation
- Unsupported Statistics for Container Node —
selfstats limited tonull_value_count

