boolean-numerify
  • 13 Dec 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

boolean-numerify

  • Dark
    Light
  • PDF

Article summary

The boolean-numerify parser will process boolean values produced by an inner parser into a numeric variable within a collection.

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

The boolean-numerify parser is a utility wrapper that enables parsers which normally produce boolean variables to produce a numeric variable instead.

Attribute - true_value

{
  "parser_type": "boolean-numerify", 
  "column": {
    "parser_type": "categorical-match",
    "column": "ccc1",
    "value": "match_string"
  },
  
  // The true_value attribute will determine the numeric value
  // assigned to each true value emitted from the inner column parser
  //
  "true_value": ####,
  
  "collection": "collection_name",
  "variable": "variable_name"
}

Attribute - false_value

{
  "parser_type": "boolean-numerify", 
  "column": {
    "parser_type": "categorical-match",
    "column": "ccc1",
    "value": "match_string"
  },
  
  // The false_value attribute will determine the numeric value
  // assigned to each false value emitted from the inner column parser
  //
  "false_value": ####,
  
  "collection": "collection_name",
  "variable": "variable_name"
}

Was this article helpful?