The correct answer is B. A string value should be specified to represent NULL values using the NULL_IF option .
When unloading data from Snowflake into files using the COPY INTO < location > command, Snowflake needs a textual representation for SQL NULL values in the unloaded files. This can be controlled by the NULL_IF file format option.
Why B is correct:
The NULL_IF option specifies one or more string values that represent SQL NULL values. During unloading, Snowflake uses this option to determine how NULL values should appear in the output files.
For example, a file format could specify:
NULL_IF = ( ' NULL ' )
This means SQL NULL values can be written using the string NULL in the unloaded file.
Why the other options are incorrect:
A. Snowflake does not always automatically convert NULL values to empty strings in all unload scenarios. The representation depends on file format settings.
C. NULL values do not cause the unload process to stop with an error by default.
D. NULL values are not automatically skipped during unloading. They are included in the output using the configured representation.
Official Snowflake documentation reference:
Snowflake documentation for file format options explains that NULL_IF specifies the string used to represent SQL NULL values when loading or unloading data.