Semi-structured and structured data functions

These functions are used with:

List of semi-structured and structured data functions

The functions are grouped by type of operation performed:

  • Parsing JSON and XML data.
  • Creating and manipulating ARRAYs and OBJECTs.
  • Extracting values from semi-structured and structured data (e.g. from an ARRAY, OBJECT, or MAP).
  • Converting/casting semi-structured data types and structured data types to/from other data types.
  • Determining the data type for values in semi-structured data (i.e. type predicates).
Sub-categoryFunctionNotes
JSON and XML ParsingCHECK_JSON
CHECK_XML
JSON_EXTRACT_PATH_TEXT
PARSE_JSON
PARSE_XML
STRIP_NULL_VALUE
Array/Object Creation and ManipulationARRAY_AGGSee also Aggregate functions.
ARRAY_APPEND
ARRAY_CAT
ARRAY_COMPACT
ARRAY_CONSTRUCT
ARRAY_CONSTRUCT_COMPACT
ARRAY_CONTAINS
ARRAY_DISTINCT
ARRAY_EXCEPT
ARRAY_FLATTEN
ARRAY_GENERATE_RANGE
ARRAY_INSERT
ARRAY_INTERSECTION
ARRAY_MAX
ARRAY_MIN
ARRAY_POSITION
ARRAY_PREPEND
ARRAY_REMOVE
ARRAY_REMOVE_AT
ARRAY_REPEAT
ARRAY_REVERSE
ARRAY_SIZE
ARRAY_SLICE
ARRAY_SORT
ARRAY_TO_STRING
ARRAY_UNION_AGGSee also Aggregate functions.
ARRAY_UNIQUE_AGGSee also Aggregate functions.
ARRAYS_OVERLAP
ARRAYS_TO_OBJECT
ARRAYS_ZIP
OBJECT_AGGSee also Aggregate functions.
OBJECT_CONSTRUCT
OBJECT_CONSTRUCT_KEEP_NULL
OBJECT_DELETE
OBJECT_INSERT
OBJECT_PICK
PROMPT
Higher-orderFILTERSee also Use lambda functions on data with Snowflake higher-order functions.
REDUCESee also Use lambda functions on data with Snowflake higher-order functions.
TRANSFORMSee also Use lambda functions on data with Snowflake higher-order functions.
Map Creation and ManipulationMAP_CAT
MAP_CONTAINS_KEY
MAP_DELETE
MAP_ENTRIES
MAP_INSERT
MAP_KEYS
MAP_PICK
MAP_SIZE
ExtractionFLATTENTable function.
GET
GET_IGNORE_CASE
GET_PATH , :Variation of GET.
OBJECT_KEYSExtracts keys from key/value pairs in OBJECT.
XMLGET
Conversion/CastingAS_*<object_type>*
AS_ARRAY
AS_BINARY
AS_CHAR , AS_VARCHAR
AS_DATE
AS_DECIMAL , AS_NUMBER
AS_DOUBLE , AS_REAL
AS_INTEGER
AS_OBJECT
AS_TIME
AS_TIMESTAMP_*
STRTOK_TO_ARRAY
TO_ARRAY
TO_JSON
TO_OBJECT
TO_VARIANT
TO_XML
Type PredicatesIS_*<object_type>*
IS_ARRAY
IS_BOOLEAN
IS_BINARY
IS_CHAR , IS_VARCHAR
IS_DATE , IS_DATE_VALUE
IS_DECIMAL
IS_DOUBLE , IS_REAL
IS_INTEGER
IS_NULL_VALUE
IS_OBJECT
IS_TIME
IS_TIMESTAMP_*
TYPEOF