ExamGecko
Question list
Search
Search

Question 681 - COF-C02 discussion

Report
Export

What takes the highest precedence in Snowflake file format options, when specified in multiple locations during data loading?

A.
The stage definition
Answers
A.
The stage definition
B.
The table definition
Answers
B.
The table definition
C.
The use of a copy into <table> statement
Answers
C.
The use of a copy into <table> statement
D.
The use of a copy INTO <location> statement
Answers
D.
The use of a copy INTO <location> statement
Suggested answer: C

Explanation:

When loading data into Snowflake, the file format options specified in the COPY INTO <table> statement take the highest precedence over other locations such as the stage or table definitions. This ensures that any specific settings for a particular load operation are applied correctly.

File Format Hierarchy:

Stage Definition: Specifies default file format options for files staged in the location.

Table Definition: Can specify default file format options associated with the table.

COPY INTO Statement: Overrides both the stage and table definitions with the file format options specified directly in the statement.

Example Usage:

COPY INTO my_table

FROM @my_stage

FILE_FORMAT = (FORMAT_NAME = 'my_format' FIELD_OPTIONALLY_ENCLOSED_BY = ''');

References:

Snowflake Documentation: Copy into Table

Snowflake Documentation: File Format Options

asked 23/09/2024
Fai Malali
30 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first