Table of Contents


Create entities, grant permissions

USE ROLE ACCOUNTADMIN;

CREATE DATABASE "<DATABASE>";

CREATE SCHEMA "<DATABASE>"."<SCHEMA>";

CREATE ROLE "<ROLE>"; 

GRANT USAGE ON DATABASE "<DATABASE>" TO ROLE "<ROLE>";

GRANT CREATE SCHEMA ON DATABASE "<DATABASE>" TO ROLE "<ROLE>";

GRANT ALL ON SCHEMA "<DATABASE>"."<SCHEMA>" TO ROLE "<ROLE>"; 

CREATE USER <USER> PASSWORD='<PASSWORD>' DEFAULT_ROLE = "<ROLE>"; 

GRANT ROLE "<ROLE>" TO USER <USER>; 

GRANT ALL ON WAREHOUSE "<WAREHOUSE_NAME>" TO "<ROLE>"; 

– via Alooma Docs

Import Snowflake data using Azure Data Factory

Note that for direct copy you need an Azure Blob Storage linked service with SAS token auth, as highlighted here. If you’re using ADLS Gen 2, you can create a Blob linked service with SAS auth and take it from there.

If you encounter error such as “Snowflake Export Copy Command validation failed: ‘The Snowflake copy command payload is invalid. Cannot specify property: column mapping”

Just reset the mapping from the copy activity. That’s it. That’s what worked for me.

– via Stack Overflow

For errors such as “ErrorCode=UserErrorOdbcOperationFailed,‘Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=ERROR [22000] Max file size (16777216) exceeded for unload single file mode. We recommend that you increase the max file size parameter, or disable single-file mode in the unload command and combine the unloaded files into a single file after you download them.”

Edit the Additional Snowflake copy options, and add property name SINGLE, with the value FALSE. Alternatively, add the MAX_FILE_SIZE property and set it to something like 268435456.

– via Microsoft Q&A