正解:B
The correct answer is B. In a named file format .
When data is regularly loaded or unloaded using the same format settings, Snowflake recommends defining those settings in a named file format. This avoids repeating the same file format options in every COPY command and reduces operational overhead.
Why B is correct:
A named file format stores reusable format options, such as file type and formatting behavior. For semi- structured data, named file formats can define options for formats such as JSON, Avro, ORC, Parquet, or XML.
Example:
CREATE FILE FORMAT my_json_format
TYPE = JSON
COMPRESSION = AUTO;
COPY INTO @my_stage/output/
FROM my_table
FILE_FORMAT = my_json_format;
Why the other options are incorrect:
A). A table definition defines table columns and properties, not unload formatting options.
C). A named stage can include a file format reference, but the reusable copy/file parsing settings themselves are defined in a named file format.
D). Copy options can be specified directly in the COPY command, but that is less efficient for repeated, similarly formatted unload operations.
Official Snowflake documentation reference:
Snowflake documentation explains that named file formats are reusable database objects that define format options for loading and unloading data.
Reference: Snowflake Documentation - CREATE FILE FORMAT; Snowflake Documentation - Data unloading; Snowflake Documentation - COPY INTO < location > ; SnowPro Core Study Guide - Data Loading and Unloading.
==