---
title: "numeric-compare"
slug: "numeric-compare-parser"
updated: 2022-07-27T17:21:48Z
published: 2022-07-27T17:21:48Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://code.tag.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# numeric-compare

The *numeric-compare* **parser** will evaluate or load data from two columns and compare their values. Depending on the value of the *operator* attribute, the comparison will evaluate to *true*, *false*, or *null*.

It inherits attributes and behaviors from its parent: abstract **parser** - *boolean*.

Note - the *columns* attribute supersedes the *column* attribute, which is not used in this **parser** type.

## Attribute - operator
The *operator* attribute is required.
```json
{
  "parser_type": "numeric-compare", 
  "columns": [
    {...}, // parser one
    {...}  // parser two 
  ],
  
  // The operator attribute defines a comparison function.
  // Options include: 
  // "=" - equals
  // "!=" - not equals
  // "<" - parser one value is less than parser two value
  // "<=" - parser one value is less than or parser to column two value
  // ">" - parser one value is greater than parser two value
  // ">=" - parser one value is greater than or equal to parser two value
  //
  "operator": ">"
}
```
## Attribute - columns
The *columns* attribute is required.
```json
{
  "parser_type": "numeric-compare", 
  "operator": ">",
  
  // The columns attribute specifies two inner parsers to produce
  // values for comparison
  //
  "columns": [
    "ccc1", // column one name - a parser will be auto-generated
    "ccc2"  // column two name - a parser will be auto-generated
  ]
}
```
## Attribute - columns as parsers
The *columns* attribute is required.
```json
{
  "parser_type": "numeric-compare", 
  "operator": ">",
  
  // The columns attribute specifies two inner parsers to produce
  // values for comparison
  //
  "columns": [
    {...}, // parser one
    {...} // parser two
  ]
}
```
