Let’s walk through the Snowflake Project for Beginners step-by-step. The goal is to upload a CSV file into Snowflake and run basic SQL queries. I’ll also provide a dummy dataset you can use.
Objective
To understand how to:
- Set up a Snowflake account
- Create a warehouse, database, and table
- Load a CSV file into a table
- Run basic SQL queries
Step 1: Set Up Your Snowflake Account
- Go to https://signup.snowflake.com
- Choose the Enterprise Edition and fill out your details. Also choose one cloud platform (AWS, Azure, GCP).

After signup, log in to the Snowflake Web UI. This free trial account will be active for next 30 days with $400 credits. By default you will get ACCOUNTADMIN role assign for you.
Step 2: Create Warehouse, Database & Schema
Snowflake has a hierarchy: Account > Warehouse > Database > Schema > Table

2.1 Create a Virtual Warehouse
A warehouse will provides compute resources. Open a new SQL worksheet and start writing code.
CREATE or REPLACE WAREHOUSE my_warehouse
WITH WAREHOUSE_SIZE = 'XSMALL'
AUTO_SUSPEND = 60
AUTO_RESUME = TRUE;

2.2 Create a Database and Schema
CREATE or REPLACE DATABASE demo_db;
USE DATABASE demo_db;
CREATE or REPLACE SCHEMA demo_schema;
USE SCHEMA demo_schema;
Step 3: Create a Dummy Dataset (CSV File)
Here is a simple employee dataset on my GitHub. Save this as employees.csv
.
Step 4: Create a Table in Snowflake
Before creating a table, make sure that the Role and Warehouse is selected.
CREATE OR REPLACE TABLE employees (
emp_id INT,
first_name STRING,
last_name STRING,
department STRING,
salary NUMBER,
hire_date DATE
);
Step 5: Create File Format for employees.csv
Since our file is a standard CSV with a header row and comma-separated values, here’s the SQL command to create a file format:
CREATE OR REPLACE FILE FORMAT my_csv_format
TYPE = 'CSV'
FIELD_DELIMITER = ','
SKIP_HEADER = 1
FIELD_OPTIONALLY_ENCLOSED_BY = '"'
TRIM_SPACE = TRUE
EMPTY_FIELD_AS_NULL = TRUE
COMPRESSION = 'AUTO';
Option | Purpose |
---|---|
TYPE = ‘CSV’ | Defines it as a CSV file format. |
FIELD_DELIMITER = ‘,’ | Comma-separated values. |
SKIP_HEADER = 1 | Skips the header row (first line) in the file. |
FIELD_OPTIONALLY_ENCLOSED_BY = ‘”‘ | Supports fields enclosed in double quotes. |
TRIM_SPACE = TRUE | Trims leading/trailing spaces. |
EMPTY_FIELD_AS_NULL = TRUE | Treats empty fields as NULL values. |
COMPRESSION = ‘AUTO’ | Auto-detects file compression type (e.g., gzip, none). |
Step 6: Upload CSV File to Snowflake (Using Web UI)

6.1 Use “Worksheet” > Select your demo_db.demo_schema
- Click Tables > employees > Load Data
- Upload your
employees.csv
file - Choose File Format: Delimited, Header rows: 1, Comma-separated
- Click Load
Snowflake creates a Stage internally and loads data from file to table.
Step 7: Query the Data
Now that the data is loaded, you can run SQL queries.
7.1 View All Records
SELECT * FROM employees;
7.2 Find Employees from IT Department
SELECT * FROM employees where department = 'IT';
7.3 Calculate Average Salary
SELECT AVG(salary) AS average_salary FROM employees;
7.4 Count Employees by Department
SELECT department, COUNT(*) AS total_employees
FROM employees
GROUP BY department;
7.5 Find Highest Paid Employee
SELECT * FROM employees
ORDER BY salary DESC
LIMIT 1;
7.6 Find Second Highest Paid Employee
To find the second highest salary from the employees
table in Snowflake, you can use the DENSE_RANK()
window function.
SELECT *
FROM (
SELECT *, DENSE_RANK() OVER (ORDER BY salary DESC) AS salary_rank
FROM employees
) ranked_employees
where salary_rank IN (2);
DENSE_RANK() OVER (ORDER BY salary DESC)
ranks salaries in descending order. The outer query filters only rows where the rank is 2 or 3 (i.e., second and third highest).
Step 8: Clean-Up (Optional)
If you want to delete everything created for this demo:
DROP TABLE employees;
DROP SCHEMA demo_schema;
DROP DATABASE demo_db;
DROP WAREHOUSE my_warehouse;
Optional: Automate File Loading (Using SnowSQL CLI or Python)
You can also load data programmatically via:
- SnowSQL command line
- Python with
snowflake-connector-python
andpandas
Conclusion
This is the Snowflake Project for Beginners step-by-step, where we uploaded a CSV file into Snowflake and ran basic SQL queries.