Skip to content

Boolean Terms (True/False, Yes/No)

Type Registry

Boolean Terms (True/False, Yes/No)

representation.boolean.terms

Boolean value represented as a full word or phrase: true/false, yes/no, on/off, enabled/disabled, active/inactive. Any casing (TRUE, True, true). Transforms to DuckDB BOOLEAN type.

Domain representationboolean
Casts to BOOLEAN
Scope Universal

Try it

CLI
$ finetype infer -i "true"
→ representation.boolean.terms

DuckDB

Detect
SELECT finetype('true');
-- → 'representation.boolean.terms'
Cast expression
CAST({col} AS BOOLEAN)
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS BOOLEAN) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'representation.boolean.terms';

JSON Schema

finetype schema representation.boolean.terms
{
  "$id": "https://noon.sh/schemas/representation.boolean.terms",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Boolean value represented as a full word or phrase: true/false, yes/no, on/off, enabled/disabled, active/inactive. Any casing (TRUE, True, true). Transforms to DuckDB BOOLEAN type.",
  "enum": [
    "true",
    "false",
    "yes",
    "no",
    "on",
    "off",
    "True",
    "False",
    "Yes",
    "No",
    "On",
    "Off",
    "TRUE",
    "FALSE",
    "YES",
    "NO",
    "ON",
    "OFF",
    "enabled",
    "disabled",
    "Enabled",
    "Disabled",
    "ENABLED",
    "DISABLED",
    "active",
    "inactive",
    "Active",
    "Inactive",
    "ACTIVE",
    "INACTIVE"
  ],
  "examples": [
    "true",
    "false",
    "yes",
    "no",
    "on",
    "off",
    "True",
    "False"
  ],
  "title": "Boolean Terms (True/False, Yes/No)",
  "type": "string"
}

Examples

truefalseyesnoonoffTrueFalse

Also known as

word_booltext_bool

Types in representation