surfacecleaningfix
Cleaningscalar · returns varchar

FIX

Auto-fix common data-quality issues (typos, casing, formats)

Per-row — runs once for each row.

cleaningllmtext

Syntax

FIX({{ value }}, '{{ type_hint }}')
FIX({{ value }})

Arguments

nametypedescription
valueVARCHAR
type_hint(optional)VARCHARType hint: email, phone, address, name, date, url, etc.

About

Auto-fix common data-quality issues in a value while preserving the original intent — typo corrections, format tweaks, casing, and obvious validation failures that have a natural repair. Useful on CSV imports, form submissions, scraped data: `gmial.com` → `gmail.com`, `JOHN SMITH` → `John Smith`, `(555)1234` → `(555) 123-4`. Pass an optional `type_hint` (`'email'`, `'phone'`, etc.) to narrow the fix rules and get faster, more accurate repairs. For factual errors that require domain knowledge, reach for CORRECT instead — FIX won't spot that "Springfield, CA" should be "Springfield, IL" because California has no Springfield.

Examples

Email typo fixed

SELECT
  fix ('john@gmial.com', 'email')

Nearby rabbit holes

same domain
Climb back to The Looking Glass