I am trying to copy data from Snowflake into an Azure Blob using Azure Data Factory.
The role I am using has select permissions on the table, and I have no issues querying the data using the Snowflake console.
I am also able to copy into the targeted blob from other sources (in Azure) using the same SAS token.
This is the query I have, generated by Azure Data Factory, (with specifics omitted)
COPY INTO 'azure://****.blob.core.windows.net/snowflake-stage/********-****-****-****-************/SnowflakeExportCopyCommand/'
FROM (select * from MYSCHEMA.MYTABLE)
CREDENTIALS = (AZURE_SAS_TOKEN = '****')
FILE_FORMAT = (type = CSV COMPRESSION = GZIP RECORD_DELIMITER = '
' FIELD_OPTIONALLY_ENCLOSED_BY = '"' ESCAPE = '\\' NULL_IF = '')
HEADER = TRUE
SINGLE = FALSE
OVERWRITE = TRUE
MAX_FILE_SIZE = 268435456
And this is the error I am getting:
ErrorCode=UserErrorOdbcOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [42501] Failed to access remote file: access denied.
Please check your credentials,Source=Microsoft.DataTransfer.Runtime.GenericOdbcConnectors,''Type=System.Data.Odbc.OdbcException,Message=ERROR [42501] Failed to access remote file: access denied. Please check your credentials,Source=Snowflake,'
Are there more Snowflake permissions that I need in order to do this kind of copy? Or is this perhaps an issue with the write-permissions to the Azure container?