Lesson 1 of 6
Create a Data Lake and Add Raw CSV Files
Set up a project folder with a raw-data subfolder and add three small CSV files that act as a data lake.
6 minData Engineering
After this lesson, you will be able to create a project folder for a small data pipeline, add a raw-data subfolder that acts as a data lake, and place three small CSV files in it that you will use in later lessons.
What is a data lake?
A data lake is a place where you store raw data files in their original format. Unlike a warehouse, which stores data in tables after cleaning and joining, a lake keeps the files as they arrived. In this course, your data lake is a folder on your computer called raw-data.
Create the project folder
Open a command line on your computer. Choose a place for your project, such as your home directory. Create a folder called pipeline and move into it:
mkdir pipeline
cd pipelineThis folder will hold everything you build in this course.
Add the raw-data subfolder
Inside pipeline, create a subfolder called raw-data:
mkdir raw-dataThis subfolder is your data lake. In later lessons, you will load files from here into a warehouse and export new files back here.
Create three CSV files
A CSV file stores rows of data with commas between the values. You will create three small CSV files: one for customers, one for products, and one for orders. Each file has a header row that names the columns.
Use a text editor to create a file called customers.csv inside raw-data. Type the following lines exactly, then save the file:
customer_id,name,city
1,Alice,London
2,Bob,Paris
3,Carol,BerlinThis file has three customers. The first column is an ID, the second is a name, and the third is a city.
Next, create a file called products.csv inside raw-data with these lines:
product_id,product_name,price
101,Widget,10.50
102,Gadget,20.00
103,Doodad,5.75This file has three products. The first column is an ID, the second is a product name, and the third is a price.
Finally, create a file called orders.csv inside raw-data with these lines:
order_id,customer_id,product_id,quantity,order_date
1001,1,101,2,2025-01-15
1002,2,102,1,2025-01-20
1003,1,103,5,2025-02-10
1004,3,101,1,2025-02-15This file has four orders. Each order has an ID, the customer who placed it, the product they bought, the quantity, and the date. The customer and product IDs match the IDs in the other two files.
Check your work
List the files in raw-data to confirm they are there:
ls raw-dataYou should see the three file names: customers.csv, products.csv, and orders.csv.
You can also view the contents of a file with the cat command, for example:
cat raw-data/customers.csvThis prints the lines you typed. If a file looks wrong, open it in your text editor and fix it.
What you have built
You now have a project folder called pipeline with a subfolder raw-data that holds three CSV files. This is your data lake. In the next lesson, you will set up a warehouse with SQLite tables that match these files.
Key takeaways
- A data lake is a folder that stores raw data files in their original format.
- Your project folder is called
pipeline, and your data lake is the subfolderraw-datainside it. - You have three CSV files in the lake:
customers.csv,products.csv, andorders.csv. - Each CSV file has a header row that names its columns.
- The IDs in
orders.csvmatch IDs in the other two files, which will let you join them later.
Try it
Create a fourth CSV file called returns.csv inside raw-data. It should have columns return_id, order_id, and return_date. Add two rows of data: one return for order 1002 on 2025-01-25, and one return for order 1004 on 2025-02-20. Use a text editor to create the file, then list the contents of raw-data to confirm all four files are present. A good result is that returns.csv has a header row and two data rows, with commas between the values and no extra spaces.
Official documentation
Written with AI and checked automatically. Tools change, so a command may behave differently in the version you install. Spotted a mistake? Tell us.