I am trying to copy results to Amazon s3 from snowflakes using s3n:// and s3a:// url but getting an SQL compilation error
The sql query is in the format
COPY INTO '&s3_path/&curr_dt/pvc'
FROM (
SELECT OBJECT_CONSTRUCT('id',id,'keyword',keyword)
FROM brands_delta)
CREDENTIALS = (AWS_KEY_ID='&aws_key_id' AWS_SECRET_KEY='&aws_secret_key')
FILE_FORMAT = (TYPE=JSON)
SINGLE = false
OVERWRITE = true
MAX_FILE_SIZE = 1073741824;
The error in the log files is as follows : 001011 (42601): SQL compilation error: invalid URL prefix found in: 's3a://abc/prod-runs/input/2021-01-19/pvc'