For example:
COPY INTO @my_stage/my_test.csv
FROM (select * from my_table)
FILE_FORMAT = (TYPE = CSV)
OVERWRITE=TRUE SINGLE=TRUE
will result in a csv but does not include column headers. If it is not possible with a copy into statement, is there perhaps any non-obvious technique that might accomplish this?
Thanks in advance.
Snowflake has added this feature. You can simply add an option HEADER=TRUE
:
COPY INTO @my_stage/my_test.csv
FROM (select * from my_table)
FILE_FORMAT = (TYPE = CSV)
OVERWRITE=TRUE SINGLE=TRUE HEADER=TRUE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With