Skip to content

Boolean Initials (T/F, Y/N)

Type Registry

Boolean Initials (T/F, Y/N)

representation.boolean.initials

Boolean value represented as a single initial character: T/F (true/false) or Y/N (yes/no), in any case. Transforms to DuckDB BOOLEAN type.

Domain representationboolean
Casts to BOOLEAN
Scope Universal

Try it

CLI
$ finetype infer -i "T"
→ representation.boolean.initials

DuckDB

Detect
SELECT finetype('T');
-- → 'representation.boolean.initials'
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.initials';

JSON Schema

finetype schema representation.boolean.initials
{
  "$id": "https://noon.sh/schemas/representation.boolean.initials",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Boolean value represented as a single initial character: T/F (true/false) or Y/N (yes/no), in any case. Transforms to DuckDB BOOLEAN type.",
  "enum": [
    "T",
    "F",
    "t",
    "f",
    "Y",
    "N",
    "y",
    "n"
  ],
  "examples": [
    "T",
    "F",
    "Y",
    "N",
    "t",
    "f",
    "y",
    "n"
  ],
  "title": "Boolean Initials (T/F, Y/N)",
  "type": "string"
}

Examples

TFYNtfyn

Also known as

initial_boolchar_bool

Types in representation