Finally I found this solution: (resolved auto_compress not working, and potential invalid UTF8 detected in string error) Run following in Snowflake first (one-time creation): CREATE OR REPLACE FILE FORMAT LOAD_FORMAT TYPE = 'CSV' FIELD_DELIMITER = ',' SKIP_HEADER = 1 FIELD_OPTIONALLY_ENCLOSED_BY = '"' REPLACE_INVALID_CHARACTERS = TRUE; CREATE OR REPLACE STAGE SAS_LOAD FILE_FORMAT = LOAD_FORMAT; The use following SAS code to upload: x gzip -cf /myfolder/myfile.csv > /myfolder/myfile.csv.gz; PROC SQL; CONNECT USING SNOW; Execute (REMOVE @Sas_LOAD) by SNOW; DELETE FROM SNOW.MYTABLE; Execute (PUT file:///myfolder/myfile.csv.gz @Sas_LOAD AUTO_COMPRESS = FALSE PARALLEL=4 OVERWRITE = TRUE) by SNOW; Execute (COPY INTO MYTABLE from @Sas_LOAD/myfile.csv.gz FORCE = TRUE ON_ERROR = CONTINUE) by SNOW; QUIT; x rm /myfolder/myfile.csv.gz;
... View more