Cast to boolen

Cast to Boolean

Description

Converts a value to the boolean type.

Category

Transformation

Supported Field Types

  • text
  • float
  • int

Output Field Type

  • boolean

Arguments

None

Pseudo-code (Python)

def func(val):
    """
        val: original value
    """
    if val:
        if type(val) is text: 
            return val.lower() == "true"
        else:
            return bool(val)
    else:
        return None