
Answer-first summary for fast verification
Answer: NULL_IF
The question asks which file format option converts SQL NULL values to the string 'null' when unloading data with TYPE = 'CSV'. According to Snowflake documentation and the community discussion (with 100% consensus and upvoted comments), the NULL_IF option is used for this purpose. NULL_IF specifies strings that should be converted to SQL NULL during loading, but when unloading, it works in reverse - SQL NULL values are converted to the specified string. In this case, setting NULL_IF = ('null') would convert SQL NULL to the string 'null'. The other options are not suitable: SKIP_BYTE_ORDER_MARK handles BOM characters, EMPTY_FIELD_AS_NULL converts empty fields to NULL during loading, and ESCAPE_UNENCLOSED_FIELD controls escaping of unenclosed field values.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.