I'm working on building a BULK UPSERT functionality for personal use. I'm currently uploading multiple files into S3, and from there I'm creating a stage using CREATE STAGE
command.
CREATE OR REPLACE TEMPORARY STAGE {stage}
URL={s3_dir}
CREDENTIALS=(aws_key_id='{aws_key_id}' aws_secret_key='{aws_secret_key}')
{file_format}
Now, I'd like to use this stage to do an UPSERT in the destination table in Snowflake. Can somebody provide an example of the same?
TIA