First Hands on Exercise | Lab Demo | Free trial account | Connectivity Options Snowsight snowSQL
Getting Started with Snowflake
Setting Up a Free Trial Account
- Visit sign up.snowflake.com to create a free trial account; personal email can be used if no company email is available.
- Select the Enterprise Edition for advanced features and choose your familiar cloud provider.
- Activate your account via the email sent to your registered address; check spam folders if not found.
Navigating Snowflake's Web Interface
- Upon logging in, use the user-friendly navigation bar on the left side of Snowflake's web interface (Snow Site).
- Create and manage worksheets under projects; select roles and virtual warehouses before executing SQL statements.
- Explore database objects like tables and views, collaborate on data products, and access the Snowflake Marketplace.
Monitoring and Admin Features
- Use monitoring tools to analyze query performance, check data load statuses, and debug failed queries.
- The admin page allows management of virtual warehouses, user roles, network policies, and resource usage.
Connecting with SnowSQL
Downloading and Installing SnowSQL
- Download SnowSQL from the official website; installation steps vary by operating system (Windows/Mac/Linux).
Connecting to Your Account
- Open command prompt; enter
snowsql -a <account_name> -u <username>using details from activation email.
- Enter password when prompted; you are now connected to your Snowflake account.
Using Interactive Mode
- Execute simple SQL queries on sample tables provided with your account; connection details can be pre-configured in a config file.
Additional Interaction Methods
Other Ways to Work with Snowflake
- Utilize Visual Studio Code extension for operations similar to SnowSQL within that environment.
- Interact programmatically using APIs or drivers for various programming languages including Python, Node.js, PHP.
Integration with Third-Party Tools
- Snowflake integrates with various third-party tools like Tableau, Power BI, Informatica, Talend, and Data IQ.
- Pre-built connectors facilitate easy integration with these business intelligence and data integration solutions.
Hands-On Practice Overview
- The session will involve creating database objects, loading sample data, and running queries.
- Sample data will be loaded using SQL from an S3 bucket associated with the Snowflake account.
Creating Database Objects
- Set the role in Warehouse; defaults are acceptable to execute.
- A new database named "Tasty Bite" is created along with a schema called "raw posos."
Loading Data into Tables
- A table named "menu" is created within the newly established schema.
- Running a select statement on the empty table returns no rows initially.
Using Stages for Data Loading
- A stage referencing a public S3 bucket is created for temporary raw data storage.
- Contents of the stage are listed; a compressed CSV file is identified for loading into the table.
Verifying Data Load and Queries
- The CSV file is successfully loaded into the table using a copy statement.
- Additional business queries may include retrieving values from JSON variant columns.