What is the correct order of precedence for file format options across COPY INTO TABLE, stage, and table definitions?

Master the SnowPro Advanced Architect Test with flashcards, multiple-choice questions, and detailed explanations. Prepare thoroughly for your certification!

Multiple Choice

What is the correct order of precedence for file format options across COPY INTO TABLE, stage, and table definitions?

Explanation:
In Snowflake, file format options are resolved from most specific to most general. The load operation first uses any FILE_FORMAT settings you specify directly in the COPY INTO TABLE statement. Those options override anything set at other levels. If you don’t provide file format details in the statement, Snowflake then uses the file format defined on the stage from which you’re loading. If the stage has no file_format defined, the system falls back to the defaults defined on the table itself. This lets you override defaults for a particular load, while still having sensible, reusable defaults at the stage and table levels. For example, you can load a table from a stage with a different delimiter by specifying it in the COPY INTO statement; if you omit it there, the stage’s delimiter is used; if the stage has no delimiter, the table’s defaults apply.

In Snowflake, file format options are resolved from most specific to most general. The load operation first uses any FILE_FORMAT settings you specify directly in the COPY INTO TABLE statement. Those options override anything set at other levels. If you don’t provide file format details in the statement, Snowflake then uses the file format defined on the stage from which you’re loading. If the stage has no file_format defined, the system falls back to the defaults defined on the table itself. This lets you override defaults for a particular load, while still having sensible, reusable defaults at the stage and table levels. For example, you can load a table from a stage with a different delimiter by specifying it in the COPY INTO statement; if you omit it there, the stage’s delimiter is used; if the stage has no delimiter, the table’s defaults apply.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy