Provide context-aware defaults for null/empty values (smarter COALESCE)
Per-row — runs once for each row.
DEFAULT_SMART({{ value }}, '{{ context }}'){{ value }} DEFAULT '{{ context }}'| name | type | description |
|---|---|---|
| value | VARCHAR | — |
| context | VARCHAR | Context: field type, related values, business rules |
Default value suggested
SELECT
default_smart ('missing', 'country field')Remove or mask personally identifiable information from text
Type-cast messy real-world values that trip up standard CAST
Return the canonical/official form of a value (auto-detects entity type)
Extracts 4-digit year from messy text, returns -1 if undetermined
LLM-backed year extraction (escape hatch for CLEAN_YEAR)
Pick the best non-null value from a group (quality-aware COALESCE)
Provide context-aware defaults for null/empty values (smarter COALESCE)
Per-row — runs once for each row.
DEFAULT_SMART({{ value }}, '{{ context }}'){{ value }} DEFAULT '{{ context }}'| name | type | description |
|---|---|---|
| value | VARCHAR | — |
| context | VARCHAR | Context: field type, related values, business rules |
Default value suggested
SELECT
default_smart ('missing', 'country field')Remove or mask personally identifiable information from text
Type-cast messy real-world values that trip up standard CAST
Return the canonical/official form of a value (auto-detects entity type)
Extracts 4-digit year from messy text, returns -1 if undetermined
LLM-backed year extraction (escape hatch for CLEAN_YEAR)
Pick the best non-null value from a group (quality-aware COALESCE)