Reputation: 838
I have my csv file in ADLS gen2. I need to upload this file into snowflake table.
I followed the snowflake documentation.
My source data in ADLS :
Generated SAS token :
Tried loading with the SAS token in Snowflake environment :
copy into FACT.MOVIES
from 'azure://xxx.blob.core.windows.net/airflow-dif/raw-area/'
credentials=(azure_sas_token=''sp=r&st=2021-05-31T06:22:26Z&sx42021-05-31T14:22:26Z&spr=https&sv=2020-02-10&sr=c&sig=66z1SB1nxxxxxx2e0QGK4%3D'')
file_format = (TYPE = CSV);
Getting the below error :
Failure using stage area. Cause: [This request is not authorized to perform this operation using this permission. (Status Code: 403; Error Code: AuthorizationPermissionMismatch)]
Not sure what I am missing. Any help appreciated. Thanks.
Upvotes: 1
Views: 288
Reputation: 136176
Considering you're copying files from a virtual folder (raw-area
), you will also need List
permission in your SAS token. Currently you're only creating a SAS token with Read
permission which does not allow you to list files.
Can you try by creating a SAS token with both Read
and List
permissions?
Upvotes: 2
Reputation: 14080
The problem should be the credential you are using is wrong. credential is not sas token.
Upvotes: 0