How to Create a Lakehouse in Microsoft Fabric
πΉ Step 1: Create a New Lakehouse
Navigate to your Microsoft Fabric Workspace, click on New, and search for Lakehouse in the side panel. Select the Lakehouse option from the results.
πΉ Step 2: Name Your Lakehouse
Provide a name for your Lakehouse. In this example, we're naming it LH_FabricOfData
. Click Create.
πΉ Step 3: Lakehouse Created
Once you click Create, your Lakehouse will be set up and ready to use.
Components Created with the Lakehouse
After creation, youβll be taken directly to the Lakehouse interface. Before diving into its components, letβs step back and take a look at what gets created in your workspace (in this example: My Workspace).
Youβll see that three items have been generated:
- Lakehouse β A unified data architecture platform designed to store, manage, and analyze structured and unstructured data in a single location.
- Semantic Model β A logical representation of the Delta tables in your Lakehouse, enabling advanced analytics with Power BI.
- SQL Analytics Endpoint β A SQL-based interface to query the Delta tables using T-SQL syntax.
Donβt worry if these concepts seem new. Weβll explore them more deeply in future posts.
Exploring Lakehouse Components
1. Lakehouse Interface
- Click on the Lakehouse item to enter the Lakehouse Explorer.
- here under the explorar Youβll see two tabs: Tables and Files.
- Tables: Where your Delta tables are stored.
- Files: Where uploaded raw data files are saved.
- For demonstration, letβs upload a sample employee data file, like below
- After the file been uploaded you might not see the file, in this case just refresh the File section and there you will see the file. So, you can click on the file to preview the data in it.
- Now, Lets load this fiel data to a table by using the pyspark notebook.
- Open a Notebook in your Lakehouse.
- Use PySpark code to load data from the file and create a Delta table.
- After execution, go back to the Tables tab and refresh it to see the new table.
- Clicking the table will show a data preview.
π Youβll notice a small Delta icon on the tableβs bottom-right corner, indicating itβs a Delta table.
2. SQL Analytics Endpoint
You can view and query the same data using T-SQL:
- Go back to your Workspace and open the SQL Analytics Endpoint created with the Lakehouse.
- Alternatively, switch directly from the Lakehouse UI using the top-right dropdown.
- The SQL interface looks similar to SQL Server Management Studio (SSMS).
- Navigate to the
Tables
section under the dbo schema to find your table. - You can query the data using familiar SQL syntax.
π Note: You can read data using SQL, but you cannot insert, update, or delete records. You can, however, create views, functions, and procedures based on the existing tables.
Whatβs Next?
As we currently have only one table, we'll explore the Semantic Model in greater detail in future blog posts.
β¨ Stay Tuned!
Follow this blog for more insights on Microsoft Fabric, data engineering, and programming best practices.