Flagged Mappings
Understanding and parsing validation errors in mapping results
After running a job, a mapper generates and applies mappings to the job’s source data. Schema enforcement then reviews these mappings for any invalidations.
If a job requires review, you’ll see the Result.status
marked as NEEDS_REVIEW
. The validation errors can be found in the Mapping.message
property after querying for a job’s mappings.
Structure of Validation Errors
The Mapping.message
property now contains a ValidationErrorSchema
object with two main components:
record_errors
: Specific errors for individual fieldsglobal_errors
: Errors that apply to multiple records or the entire dataset
Record Errors
Record errors are field-specific issues. They’re represented as an object where each key is the name of the problematic field, and the value is a FieldError
object:
error_message
: A description of why the field was flagged for reviewerror_type
: The category of the error (e.g., “Type Error”, “Unique Error”, “Schema Error”)
Global Errors
Global errors affect multiple records or the entire dataset. They’re grouped by error type:
error_message
: A description of the global errorerror_indices
: The indices of affected recordserror_fields
: The fields involved in the error
Error Types
The system recognizes three main types of errors:
Type Error
: Issues with data types (e.g., a string where a number is expected)Unique Error
: Violations of uniqueness constraintsSchema Error
: Structural issues with the data
Example
Here’s an example of how a ValidationErrorSchema
might look: