Docs
Snowflake and Azure Blob Storage

Snowflake and Azure Blob Storage

If you want to use Snowflake and Azure Blob Storage for your data warehouse, you need the following prerequisites:

  • Access to Snowflake
  • A Microsoft Azure account with an active subscription

Configure Snowflake

How to configure Snowflake.

In Snowflake, create a new SQL worksheet and paste in the query shown below. The query will create a Snowflake database, a warehouse, and a user with the required permissions.

After changing the MY_NAME, MY_COMMENT, and MY_PASSWORD variables, run the entire query.

configure_snowflake.sql

_23
-- Set up variables
_23
SET MY_NAME = UPPER('Y42_DEMO');
_23
SET MY_COMMENT = 'Y42 platform demo';
_23
SET MY_PASSWORD = 'my_secret_password';
_23
_23
-- Set up user / role
_23
CREATE ROLE IDENTIFIER($MY_NAME) COMMENT = $MY_COMMENT;
_23
CREATE USER IDENTIFIER($MY_NAME) COMMENT = $MY_COMMENT PASSWORD = $MY_PASSWORD MUST_CHANGE_PASSWORD = false DEFAULT_ROLE = $MY_NAME;
_23
GRANT ROLE IDENTIFIER($MY_NAME) TO ROLE IDENTIFIER('ACCOUNTADMIN');
_23
GRANT ROLE IDENTIFIER($MY_NAME) TO USER IDENTIFIER($MY_NAME);
_23
_23
-- Set up database
_23
CREATE DATABASE IDENTIFIER($MY_NAME) COMMENT = $MY_COMMENT;
_23
GRANT CREATE SCHEMA ON DATABASE IDENTIFIER($MY_NAME) TO ROLE IDENTIFIER($MY_NAME);
_23
GRANT ALL ON DATABASE IDENTIFIER($MY_NAME) TO ROLE IDENTIFIER($MY_NAME);
_23
GRANT OWNERSHIP ON DATABASE IDENTIFIER($MY_NAME) TO ROLE IDENTIFIER($MY_NAME) REVOKE CURRENT GRANTS;
_23
_23
-- Set up warehouse
_23
CREATE WAREHOUSE IDENTIFIER($MY_NAME) COMMENT = $MY_COMMENT WAREHOUSE_SIZE = 'X-Small' AUTO_RESUME = true AUTO_SUSPEND = 120 WAREHOUSE_TYPE = 'STANDARD';
_23
GRANT USAGE ON WAREHOUSE IDENTIFIER($MY_NAME) TO ROLE IDENTIFIER($MY_NAME);
_23
_23
-- Create network policy if required
_23
-- CREATE NETWORK POLICY y42_allow_list ALLOWED_IP_LIST=('35.198.72.34/24');

The example query will generate the following credentials:

FieldExample value
UserY42_DEMO
Passwordmy_secret_password
Account [1]https://<account_locator>.<cloud_region_id>.snowflakecomputing.com
WarehouseY42_DEMO
DatabaseY42_DEMO

[1] Region-specific account locator (opens in a new tab). You can retrieve this by hovering over your account in the account list and clicking on the đź”— link icon that pops up.

Store these credentials in a secure location.

Configure Azure

Create storage account

In the Azure console, go to Storage Accounts and create a new storage account. Select the Subscription and Resource group to which you'd like to tie your storage account, and provide an appropriate name (e.g., y42demo). Select the region you want to use. Leave all other settings unchanged and click Create.

Create storage container

Next, navigate to the storage account and head to the Containers tab under Data storage. Create a new container with an appropriate name (e.g., y42demo), leaving the other settings unchanged.

Retrieve access keys

Lastly, also from the Security + networking section, select the Access keys tab. Here you will see two keys, each with their own Connection string. Store the values of key1 in a secure location.

Connect Y42

Back on Y42, select Snowflake as the provider. Add all the Snowflake credentials generated by the query above: User, Password, Account URL, Warehouse, and Database.

Under Storage, select Azure Blob Storage. Enter the Account Key, Account name, and Container name credentials from the previous step.

Choose a hosting location

Choose a location or region where Y42 will create the Azure Blob Storage bucket.

Up next

You can now continue with configuring the Git repository for your Y42 space.