I am trying to resolve 2 issues
Issue 1. The Copy command created HEADER with all columns as CAPS, but I need to generate header with what Application is needed
For example
Expected Header :
AcctID,qute_c,AcctNumber,AcctName,MRR
Issue 2: The process uploads the file into s3 from the Snowflake query. When there are rows it uploads the file which works fine but when there are no rows returned, no file is uploaded which is working as expected
But still, I want to upload the empty file with HEADER only when there are no rows returned
COPY INTO '@stage/path/test.csv'
FROM (SELECT A.AcctID,B.qute_c,A.AcctNumber,A.AcctName,B.MRR FROM TABLE A , TABLE B WHERE A.AcctID=B.AcctID AND A.C_DATE = CURRENT_DATE())
MAX_FILE_SIZE = 5368706371
FILE_FORMAT = (FORMAT_NAME = 'CSV_TEXTQUOTE_NOZIP')
OVERWRITE=TRUE
SINGLE=TRUE
HEADER = TRUE;