In Y42 you can use built-in column tests, advanced tests or define your own custom tests. Note that advanced and custom tests can only be created in Code Editor mode.
Y42 comes with the following built-in column tests:
Unique: Checks that all values in a column are unique. It's especially important for columns that serve as primary keys.
Not Null: Checks that every value in a specific column is not null. This is crucial for columns where you expect every record to have a value.
Accepted Values: Validates that all the values in a column are within a specific set of accepted values. This helps in maintaining data consistency and prevents the occurrence of unexpected values.
Relationship: Ensures that there is a foreign-key relationship between a column in one table and a column in another table. This ensures data integrity and prevents orphan records.
You can declare additional tests that go beyond the built-in tests provided, in a model's
Custom tests must be located in the
tests folder. This path is configurable in the