categorical-match
  • 27 Jul 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

categorical-match

  • Dark
    Light
  • PDF

Article summary

The categorical-match parser will evaluate or load data from a single column in comparison with a categorical constant value. Depending on the value of the operator attribute, the column's data will evaluate to true, false, or null.

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

Attribute - operator

The operator attribute is required.

{
  "parser_type": "categorical-match", 
  "column": "cccc",
  "value": "vvvv",
  
  // The operator attribute defines a comparison function.
  // Options include: 
  // "=" - equals
  // "!=" - not equals
  // "_=" - lowercase equals
  // "_!=" - lowercase not equals
  // "contains" - column value contains the constant value
  // "!contains" - column value does not contain the constant value
  // "_contains" - lowercase contains
  // "_!contains" - lowercase not contains
  // "is null" - column value is null
  // "not null" - column value is not null
  //
  "operator": "="
}

Attribute - value

Either the value or values attribute is required, except in the case where the operator attribute is: "is null", or "not null".

{
  "parser_type": "categorical-match", 
  "column": "cccc",
  "operator": "=",
  
  // The value attribute defines a constant value against which
  // the parser will evaluate dynamic values from the column.
  //
  "value": "vvvv"
}

Attribute - values

Either the value or values attribute is required, except in the case where the operator attribute is: "is null", or "not null".

{
  "parser_type": "categorical-match", 
  "column": "cccc",
  "operator": "=",
  
  // The values attribute defines an array of constant values
  // against which the parser will evaluate dynamic values 
  // from the column.
  //
  // values can be an array of numeric or categorical values, 
  // depending on the parser's needs
  //
  "values": [
    "A",
    "B",
    "etc"
  ]
}

Was this article helpful?

What's Next