I wan't to save query result from Snowflake. I can save the file as a CSV file but is it possible to save the data as an XLSX file
The query I used:
file_name = 'w{}_processedsample_{}_rawsample.xlsx'.format(wave_number, time_stamp)
query = f"select * from {database}.{schema}.{view} where wavenumber={wave_number}"
get_view_query = f"copy into @{database}.{schema}.{save_to_s3_stage}/{file_name} from ({query}) HEADER = TRUE OVERWRITE = TRUE SINGLE=TRUE FILE_FORMAT = (TYPE=CSV FIELD_DELIMITER = ',' NULL_IF ='' ESCAPE_UNENCLOSED_FIELD = '\\\\' EMPTY_FIELD_AS_NULL = FALSE ENCODING = UTF8)"
Currently the xlsx file is corrupt. Also I need the xlsx file to not be zipped.
