1. The SQL Analytics Endpoint
With our data safely stored in a lakehouse, it’s time to learn how to interact with it. In this video we’ll dive into the SQL analytics endpoint.
2. The SQL Analytics Endpoint
We've learned that most users interact with lakehouses through Python notebooks or PowerBI. But you can still write SQL queries via the SQL Analytics endpoint.
3. The SQL Analytics Endpoint
A data analyst might use this tool for data exploration or reporting.
4. The SQL Analytics Endpoint
An endpoint is created automatically when a lakehouse is created. As Delta Tables are added to the lakehouse, those tables are immediately accessible through the SQL endpoint.
To access the endpoint, you simply need to navigate to your lakehouse and switch the view to SQL analytics endpoint. You’ll then be presented with an interface where you can write SQL code to analyze your data.
5. Writing SQL
Once you've landed in the SQL Analytics Engine, you're ready to begin using your SQL knowledge to analyze your data.
In this example, we're taking on the role of an analyst on the marketing team. We've queried our table about marketing campaigns to find which campaign type yield the largest ROI.
6. Read-Only
Note that the SQL analytics endpoint is a read-only experience. You’ll be met with an error message if you try to write SQL statements that use syntax like INSERT or UPDATE.
In this example, we wrote a SQL query that used an INSERT statement to add a new row to our marketing table. We got an error message telling us that a Data Manipulation statement isn’t allowed for this table.
7. Lakehouses vs. Warehouses
But don’t worry; other elements of the Fabric environment, like warehouses, let you manipulate your data. This image from Microsoft does a nice job of summarizing how lakehouses and warehouses work.
8. Lakehouses vs. Warehouses
For every lakehouse, a read-only SQL analytics endpoint is created, with which you can use SQL to access and analyze the data.
9. Lakehouses vs. Warehouses
If you wanted to manipulate the data, you could create a warehouse instead!
10. The Visual Query Editor
One final note about the SQL analytics endpoint: If you’re not familiar with SQL, Fabric allows you to write visual queries. The visual query editor provides an intuitive interface to create SQL queries without writing a single line of code. The visual query editor is quite powerful, but just like with traditional SQL queries, you only have access to read-only functionality.
11. Let's practice!
Let’s dive in to a few exercises where you’ll use the SQL analytics endpoint to explore the data in your lakehouse.