thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Intermediate

VARIANT Data Type

A Snowflake data type that stores semi-structured data such as JSON, Avro, ORC, Parquet or XML, with a maximum size of 128 MB per value.

Definition

Snowflake automatically extracts common VARIANT paths into columnar form for performance. Fields are accessed with colon and dot notation and cast with ::. OBJECT and ARRAY are related semi-structured types.

Example

SELECT v:customer.name::STRING FROM raw_json;

Exam tip

Cast VARIANT values (::STRING, ::NUMBER) before comparing or joining; otherwise results include JSON quotes.

Related terms