Length
The Length check validates whether the length of an attribute value meets the specified criteria. If the condition is not met, the check fails. This allows users to enforce length-based data quality rules without writing any expressions.
Steps
- Navigate to the Checks tab of the Validation Rule.
- Click edit ✏️ button to rename the Check which is by default Chk_[Sequential_Number].
- Select Add, then choose Length.
- Search and select the column to perform the Length check on.
- Specify the criteria by selecting operator and number value.
- Supported Operators:
- equal to – Length must be exactly equal to the given number.
- not equal to – Length must not be equal to the given number.
- greater than – Length must be greater than the given number.
- greater than or equal to – Length must be greater than or equal to the given number.
- less than – Length must be less than the given number.
- less than or equal to – Length must be less than or equal to the given number.
- between – Length must fall within the range of two provided values.
- Configure the following optional setting:
Property | Description |
---|---|
Trim Data | If enabled, the engine will trim trailing/ leading spaces before applying the check. |
Ignore NULLs | If enabled, the engine will not apply the check, resulting in a success state. |
- Use the test feature to validate the check logic without running the full rule. Enter sample input values in the text fields and click the Play button to view the output.
- Optionally, provide a Check Description to explain the purpose and business logic.
- Optionally, tag a Data Quality Dimension to the check.
- Finalize the check by selecting one of the following options:
- Cancel – Discard the check.
- Save – Save the check and close the configuration window.
- Save and Next – Save the current check and proceed to create a new one.
Output
- true – When the length of the value matches the defined criteria.
- false – When the length of the value does not match the criteria.
Example:
Rule: [S.Account_Number] equal to 10
Input: ACC3698521 → Output: true
Input: ACC987456 → Output: false
note
This check is currently supported only for columns with String datatype.
A single check can be applied to only one attribute. To validate multiple attributes, create separate Length checks for each.