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…
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)- A5% (2)
- B3% (1)
- C3% (1)
- D89% (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
Community Discussion
No community discussion yet for this question.