Snowflake
Snowflake
Basics To Intermediate
Sathish Vadivel
Data Engineer
[email protected]
https://bit.ly/4mcoVP3
Topics Covered
What is Snowflake
Why Snowflake
Uses of Snowflak
Cloud VS Traditional Data
Warehous
Snowflake Account Type
Snowflake Warehouse Siz
Calculate Warehouse Credit and
Amoun
Summary of Data Type
Supported Cloud Region
How to Create Snowflake Accoun
Snowflake Menus in Homepag
Create warehous
Create Use
Create Role
Workshee
Databas
Schem
Table
@Sathish Vadivel
Topics Covered
Creating View Tabl
Load data
Using local file
Internal stag
External stage
Retention Tim
Types of Tabl
Creating variable
Function
Snowflake Shortcut
Useful Tips for Working in Snowflak
Free Courses for Snowflake
@Sathish Vadivel
What is Snowflake?
Why Snowflake
In traditional systems, compute and
storage are tightly coupled, causing
inefficiencies
Snowflake separates them so you can scale
compute (virtual warehouses) up/down
independently of storage
This saves money: pay for compute only
when in use.
@Sathish Vadivel
Uses of Snowflake:
You can query semi-structured data using
SQL without transformation
Data Sharing: Share data across accounts
or organizations without copying it
Time Travel: Access historical data (up to
90 days)
Each team or app can use its own virtual
warehouse, so performance doesn't
degrade
You don’t need to wait for others’ queries to
finish
Decoupled architecture lets you manage
and pay for storage and compute
independently.
Use Streams + Tasks to build incremental,
automated ELT pipelines inside Snowflake
Easily integrates with tools like Tableau,
Power BI, dbt, Airflow, and Python ML
libraries.
@Sathish Vadivel
Cloud Data Warehouse vs Traditional
Data Warehouse :-
@Sathish Vadivel
Snowflake Account Types
Comparison Table :-
@Sathish Vadivel
Snowflake Virtual Warehouse Sizes
Table :-
@Sathish Vadivel
Basic Formula to Calculate
Warehouse Credit and Amount :-
For Example,
Let’s say
You use a Small warehouse (2 credits/hour
It runs for 22 minutes
Then ,
= 0.733 × 2
= 1.466 credits
@Sathish Vadivel
Summary of data types :-
@Sathish Vadivel
Summary of data types :-
@Sathish Vadivel
Supported Cloud Regions :-
@Sathish Vadivel
Step-by-Step:
Go to https://signup.snowflake.com
Step 2:
Step 3:
Step 5:
Step 6:
@Sathish Vadivel
Menus on the Snowflake homepage :
Home
Search
Projects
Data
Data Products
AI & ML
Monitoring
Admin
Home :-
@Sathish Vadivel
Search :-
Projects :-
It contains 5 sub-menus
Worksheets
Notebooks
Streamlit
Dashboards
App Packages
@Sathish Vadivel
Worksheets →Write and run SQL queries
Notebooks →Interactive Python + SQL
notebooks
Streamlit →Build Python-based interactive
apps
Dashboards →Visualize SQL data in charts
and tables
App Packages →Build and distribute
complete data apps.
Data :-
It contains 3 sub-menus
Database
Add Dat
Migration
@Sathish Vadivel
Add Data →Load new data into Snowflake
from files or external sources
Migrations →Plan and execute migrations
from other systems/databases.
Data Products :-
It contains 5 sub-menus
Marketplac
App
Private Sharin
Provider Studi
Partner Connec
@Sathish Vadivel
Private Sharing →Share data securely with
other Snowflake account
Provider Studio →Publish and manage your
own data or app
Partner Connect →Connect Snowflake to
partner tools for ETL, BI, ML, etc.
AI & ML :-
It contains 6 sub-menus
Studi
Cortex Searc
Feature
Model
Evaluation
Document A
@Sathish Vadivel
Cortex Search →Perform semantic/vector
search
Features →Manage ML feature sets across
models
Models →Train, register, and run ML
models in Snowflake
Evaluations →Compare model performance
and metrics
Document AI →Extract structured data
from unstructured documents.
Monitoring :-
It contains 7 sub-menus
Query Histor
Copy Histor
Task Histor
Dynamic Table
Traces & Log
Trust Cente
Governance
@Sathish Vadivel
Query History →View past SQL queries and
their performanc
Copy History →Track data loads from files/
clou
Task History →Monitor scheduled tasks
and workflow
Dynamic Tables →View refresh status of
dynamic (live) table
Traces & Logs →Debug advanced code
execution like Snowpark or UDF
Trust Center →Access service status,
compliance, and security inf
Governance →Monitor data policies,
masking, roles, classifications
Admin :-
It contains 8 sub-menus
Cost Managemen
Warehouses
@Sathish Vadivel
Compute Pools
Users & Roles
Accounts
Security
Contacts
Billing & Term
@Sathish Vadivel
Create Warehouse :-
Using UI,
@Sathish Vadivel
Next, click the + Warehouse button located at
the top-right corner of the interface.
@Sathish Vadivel
Then, select the warehouse size.
@Sathish Vadivel
Create user :-
@Sathish Vadivel
By providing the basic details such as User
Name, Email, Password and Confirm password,
we can create a new user.
@Sathish Vadivel
Create Roles :-
Using UI,
@Sathish Vadivel
Next, click the + Role button located at the top-
right corner of the interface.
Enter the name, select the role, and then click the
'Create Role' button to create the role.
@Sathish Vadivel
Creating the Worksheet:-
@Sathish Vadivel
After clicking on SQL Worksheet, you will be
redirected to a page like this.
@Sathish Vadivel
You can rename the worksheet in two ways by
clicking the three dots. You can also duplicate,
delete, or move the worksheet to a folder.
@Sathish Vadivel
Creating the Database :-
@Sathish Vadivel
Creating the table :-
@Sathish Vadivel
After clicking the "Load Data" button, a pop-up
window will appear.
@Sathish Vadivel
You can either drag and drop the file or browse
to select it.
@Sathish Vadivel
After clicking the "Load" button, a success pop-
up window will appear.
@Sathish Vadivel
To use an internal stage, install SnowSQL
locally based on your operating system.
https://www.snowflake.com/en/developers/
downloads/snowsql/
@Sathish Vadivel
Connect SnowSQL to your Snowflake account
using the command line.
@Sathish Vadivel
For an external stage,
@Sathish Vadivel
SQL query to create a stage for Azure cloud
storage with storage integration.
@Sathish Vadivel
Retention Time :-
@Sathish Vadivel
The table's retention period can be extended
for up to 90 days.
@Sathish Vadivel
Types of Table :-
1. Permanent Table :-
2. Temporary Table :-
Persistence: Session-based.
Retention Period:
Data in transient tables is retained for a
configurable period, typically up to 7 days.
Unlike permanent tables, data in transient
tables is not retained indefinitely and is
automatically purged after the retention
period
The retention period for this table can be
modified from 0 to 1 day.
Creating Variables :-
syntax:
@Sathish Vadivel
Functions :-
1.Scalar function: -
@Sathish Vadivel
You can execute this function as follows:
2.Table functions :-
@Sathish Vadivel
Snowflake Shortcuts (for MAC):-
@Sathish Vadivel
Useful tips for working in snowflake :
Keyboard Shortcuts :-
@Sathish Vadivel
2.Basic table details :-
Context menu :-
@Sathish Vadivel
Place Name in Editor – Inserts the table
name into the worksheet in the format
database.schema.table
Copy Name – Copies the fully qualified
table name in the format
database.schema.table
Add Columns in Editor – Inserts all column
names of the selected table into the
worksheet
View Definition – Displays the table’s DDL,
including column names and data types
Load Data – Opens options to load data
into the table from a local file or from
internal/external stages
Preview data :-
@Sathish Vadivel
“The popup
window will open
and display the
data of the table”
@Sathish Vadivel
Free Courses for snowflake :
Coursera
DataCamp
Introduction to Snowflake
@Sathish Vadivel
thank
you!
@Sathish Vadivel