frictionlessdata / data-quality-spec

A spec for reporting errors in data quality.
MIT License
20 stars 3 forks source link

Consider alternate word for "non castable" #14

Closed Stephen-Gates closed 7 years ago

Stephen-Gates commented 7 years ago

The meaning of "non castable" in this error message is not clear to non-technical users. Consider using simpler language. e.g. The value does not match the type and format in the schema.

danfowler commented 7 years ago

"message": "Row {row_number} has a value {value} in column {column_number} that does not match the expected type or format (Expected type: {field_type} - Expected format: {field_format})"

pwalsh commented 7 years ago

Should this be broken down into:

As we already break down the constraint errors.

@roll @danfowler @Stephen-Gates ?

Stephen-Gates commented 7 years ago

I think breaking it down would be helpful

danfowler commented 7 years ago

It looks like there is already a format-error for the source type.

pwalsh commented 7 years ago

@danfowler correct. we can change the wording now, before we ship v1.

Stephen-Gates commented 7 years ago

Isn't the format error for files in the wrong format (.txt vs .csv)?

pwalsh commented 7 years ago

Isn't the format error for files in the wrong format (.txt vs .csv)?

yes. so we need an alternative for format in the sense of format of a "primitive" type for a value.

roll commented 7 years ago

Breaking it down is just not possible AFIAK. That's the reason why non-castable-value has appeared at the first place.

For example we have a field descriptor:

name: name
type: date
format: %Y/%m

And having a value 2005/06/07 we just can say that it's not compliant to this field. Not enough information to say is type should be a string (bad type) or format should be fixed (bad format).

For numbers there are also field options like decimalChar comes to play when you could have proper type, proper format but still non-castable-value (and again it seems without a way to clarify the reason).

So type-error or type-[or-]format-error may be?

pwalsh commented 7 years ago

type-or-format-error

Stephen-Gates commented 7 years ago

Currently:

"message": "Row {row_number} has non castable value {value} in column {column_number} (type: {field_type}, format: {field_format})",

"description": "The value can't be cast based on the schema type and format for this field.\n\n How it could be resolved:\n - If this value is not correct, update the value.\n - If this error should be ignored disable non-castable-value check in {validator}. In this case all schema checks for row values will be ignored."

Proposed:

type-or-format-error

"message": "The value {value} in row {row_number} and column {column_number} is not (type: {field_type}, format: {field_format})",

"description": "The value does not match the schema type and format for this field.\n\n How it could be resolved:\n - If this value is not correct, update the value.\n - If this value is correct, adjust the type and/or format."

You could append "\n To ignore the error, disable the non-castable-value check in {validator}. In this case all schema checks for row values will be ignored." however this may be meaningful in every context.