CONSTRAINTS ( Collection of CONSTRAINTs )
Represents a constraint expression used to validate input or derived values within an AiSQL rule or model.
Properties of CONSTRAINT
| Name | Type | Description |
| Target | enumCONSTRAINTTargets | Specifies whether the constraint applies to input values or derived data. |
| Field | STRING | The field or feature name being evaluated by the constraint. |
| Operator | enumOperator | The comparison operator used to evaluate the constraint. |
| Value | AISQLEXPRESSION | The value or expression against which the field is evaluated. |
| Action | enumConstraintActions | The action executed when the constraint evaluation fails. |
Syntax
CONSTRAINTS
<Target> <Field> <Operator> <Value> [ON_FAIL <Action>]
Examples
MODULE
MODEL
CONSTRAINTS
INPUT_TARGET Age > 18
MODULE
MODEL
CONSTRAINTS
DATA_TARGET RiskScore >= 0.75 ON_FAIL REJECT