FILE_EXTENSION = 'string' | NONE
String that specifies the extension for files unloaded to a stage. Accepts any extension. The user is responsible for specifying a valid file extension that can be read by the desired software or service.
Note
If the SINGLE copy option is TRUE, then the COPY command unloads a file without a file extension by default. To specify a file extension, provide a file name and extension in the internal_location or external_location path. For example:
copy into @stage/data.csv ...
file_extension is the option to consider.
String that specifies the extension for files unloaded to a stage. Accepts any extension. The user is responsible for specifying a valid file extension that can be read by the desired software or service.
C. file_extension
The file_extension option must be used to specify the exact name of the file when unloading data from a relational table into a CSV file in an external stage.
It's either C or D.
The question asks: "which file format option...".
D SINGLE is not about file format option. It's a parameter for COPY INTO <location>.
Also is the question asking about the table name? or a file name? It sounds like it's about the file name, but the question says "table name", which is confusing.
I'd vote D, but I'm not 100% sure.
https://docs.snowflake.com/en/sql-reference/sql/copy-into-location
https://docs.snowflake.com/en/sql-reference/sql/create-file-format
Question - The table must be named exactly as specified by the user
Note
If the SINGLE copy option is TRUE, then the COPY command unloads a file without a file extension by default. To specify a file extension, provide a file name and extension in the internal_location or external_location path. For example:
copy into @stage/data.csv ...
C correct - from docs: "Important
If SINGLE = TRUE, then COPY ignores the FILE_EXTENSION file format option and outputs a file simply named data. To specify a file extension, provide a filename and extension in the internal or external location path."
The file_extension file format option specifies the file extension of the output file. The default file extension for CSV files is .csv. If you want the table to be named exactly as specified by the user, you must set the file_extension option to .csv.
https://docs.snowflake.com/en/sql-reference/sql/copy-into-location
Single=True and specify a single file name like this:
-- S3 bucket
COPY INTO 's3://mybucket/./../a.csv' FROM mytable;
-- Google Cloud Storage bucket
COPY INTO 'gcs://mybucket/./../a.csv' FROM mytable;
D
If the SINGLE copy option is TRUE, then the COPY command unloads a file without a file extension by default. To specify a file extension, provide a file name and extension in the internal_location or external_location path (e.g. copy into @stage/data.csv).
https://docs.snowflake.com/en/sql-reference/sql/create-file-format
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
PrasantSadangi
1 week, 2 days agoPrasantSadangi
1 week, 2 days agoJRayan
2 months agoMultiCloudIronMan
3 months, 3 weeks agoLematthew31
5 months, 3 weeks agoSamuelZhang
8 months ago0e504b5
8 months, 1 week ago0e504b5
8 months, 1 week ago[Removed]
11 months, 3 weeks agoHeetec
1 year ago[Removed]
11 months, 3 weeks agojAtlas7
1 year agoJG1984
1 year, 1 month agosinghks
1 year, 1 month agoMarcusbraga
1 year, 2 months agoHelloCosmin
1 year, 2 months agoMultiCloudIronMan
1 year, 2 months ago