Can someone share the example code for unloading data from snowflake reader account to s3 bucket as mentioned in their documentation.
The text is taken from their documentation.
https://docs.snowflake.com/en/user-guide/data-sharing-reader-create
It states as "However, you can use the COPY INTO command with your connection credentials to unload data into a cloud storage location."
2
Answers
It’s exactly the same process for unloading data from any other account using COPY INTO.
Please review the below documentation for more information and examples:
https://docs.snowflake.com/en/sql-reference/sql/copy-into-location
A Reader Account is typically limited in its capabilities, so you’ll need to ensure the following:
Below is an example assuming that the required S3 Storage Integration has already been set up and the appropriate permissions granted.
The account that created the Reader Account must set up the storage integration and grant access:
In the Reader Account, create an external stage using the shared storage integration:
Now, use the COPY INTO command to unload data from a table to the S3 bucket:
Verify if the data was unloaded into the S3 bucket. If you face any difficulties while unloading the data, please feel free to raise a Snowflake support ticket.