This is legacy documentation maintained for backward compatibility. For the latest documentation, please refer to the current guides.
Field-Level
Field-level constraints allow you to indicate additional validations that will be applied to fields of a Sheet. These constraints are in addition to the implicit constraints based on types of data. (eg: String, Number) For example, a value is required for every record (RequiredConstraint), or every record must contain a unique value for the field (UniqueConstraint).Required
Required Constraints indicate that the given field must be provided with a non-null value.A
null value in this case constitutes an empty cell.Unique
Unique Constraints indicate that the given field value must only appear once in all the values for that field.null values will appear many times because they are not considered unique as
there is no value to compare.Computed
The computed constraint hides the given field from the mapping process, so your users will not be able to map incoming columns to this field.Sheet-Level
Composite Uniqueness
Composite Uniqueness is a feature where a combination of two or more fields must be unique across an entire Sheet. To implement composite uniqueness, add the following parameters to theconstraints property:
-
namedefines the name of the constraint -
fieldsarray of field keys to consider -
typedefines the type of the constraint -
strategydefines how to determine uniqueness Can either be:concatconcatenates values from each field defined inside thefieldsarray orhashcreates a sha1 hash using of the values of each field

