nerdexam
Snowflake

COF-C02 · Question #372

Which Snowflake function will parse a JSON-null into a SQL-null?

The correct answer is D. STRIP NULL VALUE. STRIP_NULL_VALUE is the Snowflake function specifically designed to convert a JSON null (a valid JSON value of type null) into a SQL NULL. JSON null and SQL NULL are semantically different - JSON null is a typed value within a VARIANT, while SQL NULL represents the absence of a…

Data Transformations

Question

Which Snowflake function will parse a JSON-null into a SQL-null?

Options

  • ATO_CHAR
  • BTO_VARIANT
  • CTO_VARCHAR
  • DSTRIP NULL VALUE

How the community answered

(37 responses)
  • A
    5% (2)
  • B
    3% (1)
  • C
    3% (1)
  • D
    89% (33)

Explanation

STRIP_NULL_VALUE is the Snowflake function specifically designed to convert a JSON null (a valid JSON value of type null) into a SQL NULL. JSON null and SQL NULL are semantically different - JSON null is a typed value within a VARIANT, while SQL NULL represents the absence of a value. TO_CHAR and TO_VARCHAR convert values to strings, and TO_VARIANT converts a SQL value into the VARIANT type. None of these perform JSON-null to SQL-null translation.

Topics

#JSON Data Handling#NULL Handling#Data Parsing#Data Type Conversion

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice