I am new to snowflake and I have create a external stage and a give my s3 bucket url. My task is to copy json file from s3 to snowflake table. When I run copy command I am gettingan error .
My command are as follows:
create or replace file format investor_fileformat
type = 'json';
create or replace stage investor_stage
file_format = investor_fileformat url ='s3://emb-ingest-pit/extract/active/Test120220110/';
create table temp (id variant)
copy into temp from @investor_stage/Investor_20220114.json
Error: Failure using stage area. Cause: [Access Denied (Status Code: 403; Error Code: AccessDenied)].
When searched on internet it says I need "S3 bucket Integration" . I havent created one is this needed?
Thanks, Xi
The s3 bucket integration is done using Storage integration in snowflake. Storage integration is used to authenticate/authorise the s3 access. Stage is created on top of a storage integration to access s3 locations that you want.
Read how to create storage integration here and access external storage: https://docs.snowflake.com/en/user-guide/data-load-s3-config-storage-integration.html
Do follow the above doc(it is quite exhaustive) and let me know if you face any challenges