Number
Number inspectors evaluate number data.
number.equal_to
Evaluates if data is equal to the target_key value or a static value. Priority is given to the target_key if it exists.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | float64 | Value used during inspection. | Yes |
Example
sub.condition.number.equal_to(
settings={value: 999}
)
sub.cnd.num.eq({value: 999})
number.greater_than
Evaluates if data is greater than the target_key value or a static value. Priority is given to the target_key if it exists.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | float64 | Value used during inspection. | Yes |
Example
sub.condition.number.greater_than(
settings={value: 999}
)
sub.cnd.num.gt({value: 999})
number.less_than
Evaluates if data is less than the target_key value or a static value. Priority is given to the target_key if it exists.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | float64 | Value used during inspection. | Yes |
Example
sub.condition.number.less_than(
settings={value: 999}
)
sub.cnd.num.lt({value: 999})
number.bitwise.and
Evaluates data with a bitwise AND operation.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | int64 | Value used during inspection. | Yes |
Example
sub.condition.number.bitwise.and(
settings={value: std.parseHex('ff')}
)
sub.cnd.num.bitwise.and({value: std.parseHex('ff')})
number.bitwise.not
Evaluates data with a bitwise NOT operation.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | int64 | Value used during inspection. | Yes |
Example
sub.condition.number.bitwise.not(
settings={value: std.parseHex('ff')}
)
sub.cnd.num.bitwise.not({value: std.parseHex('ff')})
number.bitwise.or
Evaluates data with a bitwise OR operation.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | int64 | Value used during inspection. | Yes |
Example
sub.condition.number.bitwise.or(
settings={value: std.parseHex('ff')}
)
sub.cnd.num.bitwise.or({value: std.parseHex('ff')})
number.bitwise.xor
Evaluates data with a bitwise XOR operation.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | int64 | Value used during inspection. | Yes |
Example
sub.condition.number.bitwise.xor(
settings={value: std.parseHex('ff')}
)
sub.cnd.num.bitwise.xor({value: std.parseHex('ff')})
number.length.equal_to
Evaluates if data has a length equal to a value.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | int | Value used during inspection. | Yes |
measurement | string | Controls how the length is measured. Must be one of: - byte : Number of bytes (default).- char : Number of characters. | No |
Example
sub.condition.number.length.equal_to(
settings={value: 10}
)
sub.cnd.num.len.eq({value: 10})
number.length.greater_than
Evaluates if data has a length greater than a value.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | int | Value used during inspection. | Yes |
measurement | string | Controls how the length is measured. Must be one of: - byte : Number of bytes (default).- char : Number of characters. | No |
Example
sub.condition.number.length.greater_than(
settings={value: 10}
)
sub.cnd.num.len.gt({value: 10})
number.length.less_than
Evaluates if data has a length less than a value.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for inspection. | No |
value | int | Value used during inspection. | Yes |
measurement | string | Controls how the length is measured. Must be one of: - byte : Number of bytes (default).- char : Number of characters. | No |
Example
sub.condition.number.length.less_than(
settings={value: 10}
)
sub.cnd.num.len.lt({value: 10})
Use Cases
Ignore Missing Data
Missing data can be identified by wrapping the number_length_equal_to
inspector with the meta.none inspector:
- NOT length(value)==0
Less Than / Equal To
Use the number_length_less_than
and number_length_equal_to
inspectors with an or
operator to create a less than equal to (lte) pattern:
- length(value)==10 OR length(_value)<10
Greater Than / Equal To
Use the number_length_greater_than
and number_length_equal_to
inspectors with an or
operator to create a less than equal to (lte) pattern:
- length(value)==10 OR length(value)>10
Updated 2 months ago