AG asked a question.
Little Background :
While unloading the data from Snowflake to S3 bucket, there are two options available related to number of file viz. single file or multi-file governed by the parameter SINGLE = "True"/"False" in copy command.
In my use-case, I am using a compression format (GZIP) for a csv file defined in custom file format for copy command.
Problem Statement :
While using Single = True, I have to specifically mention <file-name>.csv.gzip in the name of file to make sure output file can be readable otherwise the output file would be just <file-name>
BUT
in case of Single = "False", if I am giving the <file-name>.csv.gzip as output file-name what I am getting as output is multiple files like below :
<file-name>.csv.gzip_01_01_01.csv.gz
<file-name>.csv.gzip_01_01_02.csv.gz
<file-name>.csv.gzip_01_01_03.csv.gz
and so on.
that means snowflake is explicitly adding csv.gz extension in case of muli-part files which is different from usual behavior .
I'm unsure of your question here. The behavior you are seeing is the desired output. If you don't want the .csv.gzip in your SINGLE = False output, then change your file-name. The .csv is added to the end only if you are setting a file extension in your COPY statement (this can be removed, if desired). The .gz is added because you are asking for compression. SINGLE = True and SINGLE = False have different behavior, which is documented here: https://docs.snowflake.net/manuals/sql-reference/sql/copy-into-location.html