0
0
Snowflakecloud~30 mins

Creating a Snowflake account and workspace - Try It Yourself

Choose your learning style9 modes available
Creating a Snowflake account and workspace
📖 Scenario: You are starting a new cloud data project and need to set up a Snowflake account and workspace. This workspace will allow you to store and analyze data securely in the cloud.
🎯 Goal: Create a Snowflake account and set up a workspace with a database and a warehouse to prepare for data loading and querying.
📋 What You'll Learn
Create a Snowflake account variable with the exact name account_name and value my_snowflake_account.
Create a variable user_name with the value admin_user.
Create a variable role_name with the value SYSADMIN.
Create a database named MY_DATABASE.
Create a warehouse named MY_WAREHOUSE with size SMALL and auto suspend after 300 seconds.
Use the variables to configure the session.
💡 Why This Matters
🌍 Real World
Setting up a Snowflake workspace is the first step in managing cloud data storage and analytics for businesses.
💼 Career
Cloud engineers and data engineers often need to configure Snowflake accounts and workspaces to enable data pipelines and analytics.
Progress0 / 4 steps
1
Set up Snowflake account variables
Create three variables: account_name with value my_snowflake_account, user_name with value admin_user, and role_name with value SYSADMIN.
Snowflake
Need a hint?

Use simple assignment statements to create the variables with the exact names and values.

2
Configure Snowflake session
Create a Snowflake connection configuration dictionary named connection_config using the variables account_name, user_name, and role_name. Include warehouse and database keys with values MY_WAREHOUSE and MY_DATABASE respectively.
Snowflake
Need a hint?

Use a dictionary to hold the connection settings, referencing the variables you created.

3
Create database and warehouse SQL commands
Create two string variables: create_database_sql with the SQL command to create a database named MY_DATABASE, and create_warehouse_sql with the SQL command to create a warehouse named MY_WAREHOUSE of size SMALL that auto suspends after 300 seconds.
Snowflake
Need a hint?

Write the exact SQL commands as strings to create the database and warehouse.

4
Finalize workspace setup commands
Add a variable use_database_sql with the SQL command to use the database MY_DATABASE. Then add a variable use_warehouse_sql with the SQL command to use the warehouse MY_WAREHOUSE.
Snowflake
Need a hint?

Write the exact SQL commands as strings to switch to the database and warehouse.