Skip to content

CONSOLIDATED - NOT EMPTY

Description

The NOT EMPTY validator is designed to ensure that a field's value is not empty. This validator is particularly useful for data validation in scenarios where empty values are considered invalid or an error. It supports all data types, including BLOBs, making it versatile for various data validation needs.


Config Location

To configure the NOT EMPTY validator, you need to define it within the consDPValidators section of your data point configuration within the schema. This involves specifying the validator name and entity.


Supported Data Types

  • Json
  • BLOB
  • String
  • Boolean
  • Decimal
  • Double
  • Integer

Config Requirements

Config ({}) options are not required for the NOT EMPTY validator. This validator is designed to perform a straightforward check for non-empty values without the need for additional configuration parameters.


Example Config

Below is an example of how to configure the NOT EMPTY validator in XML format. This example demonstrates a validator that checks if the "NAME" data point is not empty.

1
2
3
4
5
<dataPoint name="NAME" dataType="STRING">
    <consDPValidators>
        <consDPValidator name="CHECK_NOT_EMPTY" entity="NOT_EMPTY"/>
    </consDPValidators>
</dataPoint>

Example Result

Upon successful configuration and execution, the NOT EMPTY validator will check the current "NAME" value to ensure it is not empty. If the value is empty, a violation will be triggered, indicating that the value does not meet the criteria for acceptability.


Common Mistakes

  • Ensure that the validator name and entity are correctly defined in the configuration to ensure that the validator is correctly identified and applied during the data processing pipeline.
  • Remember that the NOT EMPTY validator does not require any configuration. If you attempt to provide a <config> block, it will be ignored.