surfaceclassificationinfer_type
Classificationscalar · returns varchar

INFER_TYPE

Detect the semantic type of a value (email, phone, date, etc.)

Per-row — runs once for each row.

classificationllmtext

Syntax

INFER_TYPE({{ value }})
{{ value }} IS TYPE
TYPEOF({{ value }})

Arguments

nametypedescription
valueVARCHAR

About

Guess the semantic type of a value: email, phone, date, address, URL, product code, SSN, and so on. Returns a short type label. Useful for schema discovery on unknown CSVs, profiling a column before choosing a cleaning strategy, or building a data catalog that needs type hints on free-form columns. Works even on columns that SQL would just call VARCHAR. For validating that a value matches an expected type, use VALID instead. INFER_TYPE tells you what a value IS; VALID tells you whether it matches what you EXPECTED.

Examples

Email type detected

SELECT
  infer_type ('john@example.com')

Nearby rabbit holes

same domain
Climb back to The Looking Glass